Tests: Use more appropriate assertions in various tests.

This replaces instances of `assertTrue( strpos( ... ) > 0 )` with `assertStringContainsString()` to use native PHPUnit functionality.

Going forward, these methods introduced in PHPUnit 7.5 should be used for similar assertions:

* `assertStringContainsString()`
* `assertStringNotContainsString()`

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

Follow-up to [51335], [51337], [51367], [51397], [51403], [51404], [51436], [51438], [51448], [51449].

See #53363.
Built from https://develop.svn.wordpress.org/trunk@51451


git-svn-id: http://core.svn.wordpress.org/trunk@51062 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2021-07-17 10:37:58 +00:00
parent 69a57fe80e
commit e0c355fcaa

View File

@ -13,7 +13,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.9-alpha-51450';
$wp_version = '5.9-alpha-51451';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.