Changeset 56356 for trunk/tests/phpunit/tests/admin/wpListTable.php
- Timestamp:
- 08/03/2023 07:50:20 PM (2 years ago)
- File:
-
- 1 edited
-
trunk/tests/phpunit/tests/admin/wpListTable.php (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/admin/wpListTable.php
r56349 r56356 372 372 * @param mixed $expected Expected value. 373 373 */ 374 public function test_should_get_compat_fields _defined_property( $property_name, $expected ) {374 public function test_should_get_compat_fields( $property_name, $expected ) { 375 375 $list_table = new WP_List_Table( array( 'plural' => '_wp_tests__get' ) ); 376 376 … … 390 390 $this->expectDeprecation(); 391 391 $this->expectDeprecationMessage( 392 'The property `unde fined_property` is not defined. Getting a dynamic (undefined)property is ' .393 'deprecated since version 6.4.0! Instead, de fine the property on the class.'394 ); 395 $this->assertNull( $this->list_table->unde fined_property, 'Getting a dynamic property should return null from WP_List_Table::__get()' );392 'The property `undeclared_property` is not declared. Getting a dynamic property is ' . 393 'deprecated since version 6.4.0! Instead, declare the property on the class.' 394 ); 395 $this->assertNull( $this->list_table->undeclared_property, 'Getting a dynamic property should return null from WP_List_Table::__get()' ); 396 396 } 397 397 … … 419 419 $this->expectDeprecation(); 420 420 $this->expectDeprecationMessage( 421 'The property `unde fined_property` is not defined. Setting a dynamic (undefined)property is ' .422 'deprecated since version 6.4.0! Instead, de fine the property on the class.'423 ); 424 $this->list_table->unde fined_property = 'some value';421 'The property `undeclared_property` is not declared. Setting a dynamic property is ' . 422 'deprecated since version 6.4.0! Instead, declare the property on the class.' 423 ); 424 $this->list_table->undeclared_property = 'some value'; 425 425 } 426 426 … … 434 434 * @param mixed $expected Expected value. 435 435 */ 436 public function test_should_isset_compat_fields _defined_property( $property_name, $expected ) {436 public function test_should_isset_compat_fields( $property_name, $expected ) { 437 437 $actual = isset( $this->list_table->$property_name ); 438 438 if ( is_null( $expected ) ) { … … 451 451 $this->expectDeprecation(); 452 452 $this->expectDeprecationMessage( 453 'The property `unde fined_property` is not defined. Checking `isset()` on a dynamic (undefined)property ' .454 'is deprecated since version 6.4.0! Instead, de fine the property on the class.'455 ); 456 $this->assertFalse( isset( $this->list_table->unde fined_property ), 'Checking a dyanmic property should return false from WP_List_Table::__isset()' );453 'The property `undeclared_property` is not declared. Checking `isset()` on a dynamic property ' . 454 'is deprecated since version 6.4.0! Instead, declare the property on the class.' 455 ); 456 $this->assertFalse( isset( $this->list_table->undeclared_property ), 'Checking a dynamic property should return false from WP_List_Table::__isset()' ); 457 457 } 458 458 … … 478 478 $this->expectDeprecation(); 479 479 $this->expectDeprecationMessage( 480 'A property `unde fined_property` is not defined. Unsetting a dynamic (undefined)property is ' .481 'deprecated since version 6.4.0! Instead, de fine the property on the class.'482 ); 483 unset( $this->list_table->unde fined_property );480 'A property `undeclared_property` is not declared. Unsetting a dynamic property is ' . 481 'deprecated since version 6.4.0! Instead, declare the property on the class.' 482 ); 483 unset( $this->list_table->undeclared_property ); 484 484 } 485 485
Note: See TracChangeset
for help on using the changeset viewer.