Changeset 51563
- Timestamp:
- 08/06/2021 09:38:45 PM (3 years ago)
- Location:
- trunk/tests/phpunit/tests
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/compat.php
r51415 r51563 181 181 182 182 function test_json_encode_decode() { 183 $this->expect Exception( 'PHPUnit_Framework_Error_Deprecated');183 $this->expectDeprecation(); 184 184 185 185 require_once ABSPATH . WPINC . '/class-json.php'; -
trunk/tests/phpunit/tests/dependencies/scripts.php
r51462 r51563 1425 1425 if ( $warning ) { 1426 1426 if ( PHP_VERSION_ID < 80000 ) { 1427 $this->expect Exception( 'PHPUnit_Framework_Error_Warning');1427 $this->expectWarning(); 1428 1428 } else { 1429 // As this exception will only be set on PHP 8 in combination with PHPUnit 7, this will work (for now). 1429 /* 1430 * As this exception will only be set on PHP 8 in combination with PHPUnit 7, this will work (for now). 1431 * Once the PHPUnit version constraints have been widened and a _supported_ PHPUnit version is 1432 * used to run the tests on PHP 8.x, this should be changed to `$this->expectError()`. 1433 */ 1430 1434 $this->expectException( 'Error' ); 1431 1435 } -
trunk/tests/phpunit/tests/locale.php
r48993 r51563 28 28 public function test_get_weekday_undefined_index() { 29 29 if ( PHP_VERSION_ID >= 80000 ) { 30 $this->expect Exception( 'PHPUnit_Framework_Error_Warning');30 $this->expectWarning(); 31 31 } else { 32 $this->expect Exception( 'PHPUnit_Framework_Error_Notice');32 $this->expectNotice(); 33 33 } 34 34 -
trunk/tests/phpunit/tests/rest-api/rest-block-directory-controller.php
r49603 r51563 90 90 $this->prevent_requests_to_host( 'api.wordpress.org' ); 91 91 92 $this->expect Exception( 'PHPUnit_Framework_Error_Warning');92 $this->expectWarning(); 93 93 $response = rest_do_request( $request ); 94 94 $this->assertErrorResponse( 'plugins_api_failed', $response, 500 ); -
trunk/tests/phpunit/tests/rest-api/rest-plugins-controller.php
r50633 r51563 537 537 $this->prevent_requests_to_host( 'api.wordpress.org' ); 538 538 539 $this->expect Exception( 'PHPUnit_Framework_Error_Warning');539 $this->expectWarning(); 540 540 $response = rest_do_request( $request ); 541 541 $this->assertErrorResponse( 'plugins_api_failed', $response, 500 ); -
trunk/tests/phpunit/tests/rest-api/rest-schema-sanitization.php
r49246 r51563 458 458 public function test_format_validation_is_applied_if_missing_type() { 459 459 if ( PHP_VERSION_ID >= 80000 ) { 460 $this->expect Exception( 'PHPUnit_Framework_Error_Warning'); // For the undefined index.460 $this->expectWarning(); // For the undefined index. 461 461 } else { 462 $this->expect Exception( 'PHPUnit_Framework_Error_Notice' );462 $this->expectNotice(); // For the undefined index. 463 463 } 464 464 -
trunk/tests/phpunit/tests/rest-api/rest-schema-validation.php
r50653 r51563 158 158 public function test_format_validation_is_applied_if_missing_type() { 159 159 if ( PHP_VERSION_ID >= 80000 ) { 160 $this->expect Exception( 'PHPUnit_Framework_Error_Warning'); // For the undefined index.160 $this->expectWarning(); // For the undefined index. 161 161 } else { 162 $this->expect Exception( 'PHPUnit_Framework_Error_Notice' );162 $this->expectNotice(); // For the undefined index. 163 163 } 164 164
Note: See TracChangeset
for help on using the changeset viewer.