wordpress-develop/tests/phpunit/tests/comment
Sergey Biryukov 60dcae95ea Tests: Fix tests failing due to assertContains() using strict checking.
Since PHPUnit 8.0.2, the `assertContains()` method, when checking whether a value exists in an array, will do a strict type comparison of the values.

This caused a couple of tests to fail. Using the correct data type in the test fixes that.

References:
* https://github.com/sebastianbergmann/phpunit/blob/8.0.6/ChangeLog-8.0.md#802---2019-02-07
* https://github.com/sebastianbergmann/phpunit/issues/3511
* 6205f33595

Follow-up to [51559-51570].

Props jrf.
See #46149.

git-svn-id: https://develop.svn.wordpress.org/trunk@51571 602fd350-edb4-49c9-b593-d223f7449a82
2021-08-07 10:51:59 +00:00
..
checkComment.php General: Remove “whitelist” and “blacklist” in favor of more clear and inclusive language. 2020-06-22 17:24:34 +00:00
commentForm.php Tests: Replace assertRegExp() with assertMatchesRegularExpression(). 2021-08-06 21:52:06 +00:00
commentsTemplate.php Tests: Replace assertContains() with assertStringContainsString() when used with strings. 2021-07-19 14:00:11 +00:00
dateQuery.php Build/Test Tools: Implement use of the void solution. 2021-08-07 10:29:41 +00:00
getCommentAuthorEmailLink.php Build/Test Tools: Implement use of the void solution. 2021-08-07 10:29:41 +00:00
getCommentAuthorUrl.php Code is Poetry. 2017-11-30 23:09:33 +00:00
getCommentAuthorUrlLink.php Build/Test Tools: Standardise the name, signature, and usage of the wpSetUpBeforeClass() method that's used in test classes. 2020-11-15 13:59:32 +00:00
getCommentClass.php Unit Tests: after [35225], make factory a method/getter on WP_UnitTestCase and add magic methods for BC for every plugin that is extending WP_UnitTestCase and accessing the $factory instance prop. 2015-10-17 18:02:16 +00:00
getCommentCount.php Comments: Ensure all elements in the array returned by get_comment_count() are integers. 2020-03-28 20:42:31 +00:00
getCommentExcerpt.php Tests: Use more appropriate assertions in various tests. 2021-07-07 10:32:56 +00:00
getCommentLink.php Tests: Replace assertContains() with assertStringContainsString() when used with strings. 2021-07-19 14:00:11 +00:00
getCommentReplyLink.php Tests: Replace assertContains() with assertStringContainsString() when used with strings. 2021-07-19 14:00:11 +00:00
getCommentsPagesCount.php Build/Test Tools: Implement use of the void solution. 2021-08-07 10:29:41 +00:00
getPageOfComment.php Tests: Fix tests failing due to assertContains() using strict checking. 2021-08-07 10:51:59 +00:00
isAvatarCommentType.php Tests: Correct a number of malformed @covers tags. 2020-08-23 17:23:52 +00:00
lastCommentModified.php Tests: Use @ticket annotation for ticket numbers, for clarity. 2021-02-13 12:17:36 +00:00
metaCache.php Build/Test Tools: Replace assertInternalType() usage in unit tests. 2021-07-05 17:21:53 +00:00
query.php Tests: Replace assertContains() with assertStringContainsString() when used with strings. 2021-07-19 14:00:11 +00:00
slashes.php Build/Test Tools: Implement use of the void solution. 2021-08-07 10:29:41 +00:00
template.php Tests: Use shared post fixture in comment template tests. 2020-12-22 07:42:23 +00:00
walker.php Build/Test Tools: Implement use of the void solution. 2021-08-07 10:29:41 +00:00
wpAllowComment.php Build/Test Tools: Standardise the name, signature, and usage of the wpSetUpBeforeClass() method that's used in test classes. 2020-11-15 13:59:32 +00:00
wpBatchUpdateCommentType.php Tests: First pass at using assertSame() instead of assertEquals() in most of the unit tests. 2020-09-02 00:35:36 +00:00
wpBlacklistCheck.php General: Update code for readability and inclusion 2020-07-23 03:12:49 +00:00
wpComment.php Build/Test Tools: Standardise the name, signature, and usage of the wpSetUpBeforeClass() method that's used in test classes. 2020-11-15 13:59:32 +00:00
wpCountComments.php Tests: First pass at using assertSame() instead of assertEquals() in most of the unit tests. 2020-09-02 00:35:36 +00:00
wpListComments.php Docs: Improve inline comments per the documentation standards. 2020-01-29 00:43:23 +00:00
wpUpdateCommentCountNow.php Correct usage of Covers for Tests_Update_Comment_Count_Now 2016-05-17 20:19:50 +00:00