Changeset 56356
- Timestamp:
- 08/03/2023 07:50:20 PM (17 months ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/class-wp-list-table.php
r56349 r56356 188 188 189 189 trigger_error( 190 "The property `{$name}` is not de fined. Getting a dynamic (undefined)property is " .191 'deprecated since version 6.4.0! Instead, de fine the property on the class.',190 "The property `{$name}` is not declared. Getting a dynamic property is " . 191 'deprecated since version 6.4.0! Instead, declare the property on the class.', 192 192 E_USER_DEPRECATED 193 193 ); … … 211 211 212 212 trigger_error( 213 "The property `{$name}` is not de fined. Setting a dynamic (undefined)property is " .214 'deprecated since version 6.4.0! Instead, de fine the property on the class.',213 "The property `{$name}` is not declared. Setting a dynamic property is " . 214 'deprecated since version 6.4.0! Instead, declare the property on the class.', 215 215 E_USER_DEPRECATED 216 216 ); … … 232 232 233 233 trigger_error( 234 "The property `{$name}` is not de fined. Checking `isset()` on a dynamic (undefined)property " .235 'is deprecated since version 6.4.0! Instead, de fine the property on the class.',234 "The property `{$name}` is not declared. Checking `isset()` on a dynamic property " . 235 'is deprecated since version 6.4.0! Instead, declare the property on the class.', 236 236 E_USER_DEPRECATED 237 237 ); … … 254 254 255 255 trigger_error( 256 "A property `{$name}` is not de fined. Unsetting a dynamic (undefined)property is " .257 'deprecated since version 6.4.0! Instead, de fine the property on the class.',256 "A property `{$name}` is not declared. Unsetting a dynamic property is " . 257 'deprecated since version 6.4.0! Instead, declare the property on the class.', 258 258 E_USER_DEPRECATED 259 259 ); -
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.