Changeset 51451 for trunk/tests/phpunit/includes/testcase.php
- Timestamp:
- 07/17/2021 10:36:52 AM (4 years ago)
- File:
-
- 1 edited
-
trunk/tests/phpunit/includes/testcase.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/includes/testcase.php
r51331 r51451 373 373 static::assertFalse( is_iterable( $actual ), $message ); 374 374 } 375 376 /** 377 * Asserts that a string haystack contains a needle. 378 * 379 * This method has been backported from a more recent PHPUnit version, 380 * as tests running on PHP 5.6 use PHPUnit 5.7.x. 381 * 382 * @since 5.9.0 383 * 384 * @param string $needle The string to search for. 385 * @param string $haystack The string to treat as the haystack. 386 * @param string $message Optional. Message to display when the assertion fails. 387 */ 388 public static function assertStringContainsString( $needle, $haystack, $message = '' ) { 389 static::assertContains( $needle, $haystack, $message ); 390 } 391 392 /** 393 * Asserts that a string haystack does not contain a needle. 394 * 395 * This method has been backported from a more recent PHPUnit version, 396 * as tests running on PHP 5.6 use PHPUnit 5.7.x. 397 * 398 * @since 5.9.0 399 * 400 * @param string $needle The string to search for. 401 * @param string $haystack The string to treat as the haystack. 402 * @param string $message Optional. Message to display when the assertion fails. 403 */ 404 public static function assertStringNotContainsString( $needle, $haystack, $message = '' ) { 405 static::assertNotContains( $needle, $haystack, $message ); 406 } 375 407 }
Note: See TracChangeset
for help on using the changeset viewer.