Changeset 58968 for trunk/tests/phpunit/tests/meta.php
- Timestamp:
- 09/02/2024 10:16:24 PM (5 weeks ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/meta.php
r56746 r58968 420 420 } 421 421 422 /** 423 * @dataProvider data_get_metadata_with_non_existent_object_id 424 */ 425 public function test_get_metadata_with_non_existent_object_id( $expected, $args ) { 426 $this->assertSame( $expected, get_metadata( 'user', ...$args ) ); 427 } 428 429 public function data_get_metadata_with_non_existent_object_id() { 430 return array( 431 'should return empty array for default `$meta_key` and `$single` values' => array( 432 'expected' => array(), 433 'args' => array( PHP_INT_MAX ), 434 ), 435 'should return empty array for default `$single` value' => array( 436 'expected' => array(), 437 'args' => array( PHP_INT_MAX, 'meta_key' ), 438 ), 439 'should return empty array when `$single` is `false`' => array( 440 'expected' => array(), 441 'args' => array( PHP_INT_MAX, 'meta_key', false ), 442 ), 443 'should return empty string when `$single` is `true`' => array( 444 'expected' => '', 445 'args' => array( PHP_INT_MAX, 'meta_key', true ), 446 ), 447 ); 448 } 449 422 450 /** Helpers */ 423 451
Note: See TracChangeset
for help on using the changeset viewer.