wordpress-develop/tests/phpunit/tests/term
Sergey Biryukov c70fe62ed1 Tests: Replace assertContains() with assertStringContainsString() when used with strings.
Using the `assertContains()` and `assertNotContains()` methods with string haystacks was deprecated in PHPUnit 8 and removed in PHPUnit 9.

While WordPress test suite currently only supports PHPUnit up to 7.5.x, this allows us to switch to newer assertions ahead of adding full support for PHPUnit 8+.

These methods introduced in PHPUnit 7.5 should be used as an alternative:

* `assertStringContainsString()`
* `assertStringContainsStringIgnoringCase`
* `assertStringNotContainsString()`
* `assertStringNotContainsStringIgnoringCase`

As WordPress currently uses PHPUnit 5.7.x to run tests on PHP 5.6, polyfills for these methods were added to the `WP_UnitTestCase` class for PHPUnit < 7.5.

Follow-up to [51331], [51451], [51461].

Props jrf, dd32, SergeyBiryukov.
See #53363, #46149.

git-svn-id: https://develop.svn.wordpress.org/trunk@51462 602fd350-edb4-49c9-b593-d223f7449a82
2021-07-19 14:00:11 +00:00
..
cache.php Tests: Use more appropriate assertions in various tests. 2021-07-07 10:32:56 +00:00
categoryExists.php Code is Poetry. 2017-11-30 23:09:33 +00:00
getEditTermLink.php Tests: First pass at using assertSame() instead of assertEquals() in most of the unit tests. 2020-09-02 00:35:36 +00:00
getTagLink.php Coding Standards: Upgrade WPCS to 1.0.0 2018-08-17 01:50:26 +00:00
getTerm.php Tests: Use more appropriate assertions in various tests. 2021-07-10 11:15:44 +00:00
getTermBy.php Tests: Replace assertContains() with assertStringContainsString() when used with strings. 2021-07-19 14:00:11 +00:00
getTermField.php Tests: Fix two typos introduced for a get_term_field() test in [35270]. 2018-02-03 17:10:51 +00:00
getTermLink.php Tests: Replace assertContains() with assertStringContainsString() when used with strings. 2021-07-19 14:00:11 +00:00
getTermParentsList.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
getTerms.php Tests: Use more appropriate assertions in various tests. 2021-07-07 10:32:56 +00:00
getTheTerms.php Tests: Use more appropriate assertions in various tests. 2021-07-07 10:32:56 +00:00
isObjectInTerm.php Code is Poetry. 2017-11-30 23:09:33 +00:00
meta.php Tests: Use more appropriate assertions in various tests. 2021-07-07 10:32:56 +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: Standardise the name, signature, and usage of the wpSetUpBeforeClass() method that's used in test classes. 2020-11-15 13:59:32 +00:00
splitSharedTerm.php Tests: Introduce assertSameSets() and assertSameSetsWithIndex(), and use them where appropriate. 2020-09-04 07:01:00 +00:00
taxQuery.php Tests: Use more appropriate assertions in various tests. 2021-07-07 10:32:56 +00:00
termCounts.php Taxonomy: Add filter for post statuses when updating term count. 2021-02-02 21:04:58 +00:00
termExists.php Build/Test Tools: Replace assertInternalType() usage in unit tests. 2021-07-05 17:21:53 +00:00
wpDeleteObjectTermRelationships.php Tests: Introduce assertSameSets() and assertSameSetsWithIndex(), and use them where appropriate. 2020-09-04 07:01:00 +00:00
wpDeleteTerm.php General: Replace older-style PHP type conversion functions with type casts. 2020-10-08 21:13:57 +00:00
wpGenerateTagCloud.php Tests: Replace assertContains() with assertStringContainsString() when used with strings. 2021-07-19 14:00:11 +00:00
wpGetObjectTerms.php Tests: Use more appropriate assertions in various tests. 2021-07-10 11:15:44 +00:00
wpInsertTerm.php Tests: Use more appropriate assertions in various tests. 2021-07-18 14:10:24 +00:00
wpRemoveObjectTerms.php Bust object term cache in wp_remove_object_terms(). 2015-10-19 01:52:22 +00:00
wpSetObjectTerms.php Tests: Use more appropriate assertions in various tests. 2021-07-07 10:32:56 +00:00
wpTaxonomy.php Tests: Use more appropriate assertions in various tests. 2021-07-12 10:35:44 +00:00
wpTerm.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
wpUniqueTermSlug.php Tests: First pass at using assertSame() instead of assertEquals() in most of the unit tests. 2020-09-02 00:35:36 +00:00
wpUpdateTerm.php Tests: Use more appropriate assertions in various tests. 2021-07-12 10:35:44 +00:00