Changeset 51697
- Timestamp:
- 08/30/2021 08:18:31 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/includes/abstract-testcase.php
r51657 r51697 686 686 */ 687 687 public function assertEqualFields( $object, $fields, $message = '' ) { 688 $this->assertIsObject( $object, $message . ' Passed $object is not an object.' ); 689 $this->assertIsArray( $fields, $message . ' Passed $fields is not an array.' ); 690 $this->assertNotEmpty( $fields, $message . ' Fields array is empty.' ); 691 688 692 foreach ( $fields as $field_name => $field_value ) { 689 693 $this->assertObjectHasAttribute( $field_name, $object, $message . " Property $field_name does not exist on the object." ); … … 761 765 */ 762 766 public function assertSameSets( $expected, $actual, $message = '' ) { 767 $this->assertIsArray( $expected, $message . ' Expected value must be an array.' ); 768 $this->assertIsArray( $actual, $message . ' Value under test is not an array.' ); 769 763 770 sort( $expected ); 764 771 sort( $actual ); … … 777 784 */ 778 785 public function assertEqualSets( $expected, $actual, $message = '' ) { 786 $this->assertIsArray( $expected, $message . ' Expected value must be an array.' ); 787 $this->assertIsArray( $actual, $message . ' Value under test is not an array.' ); 788 779 789 sort( $expected ); 780 790 sort( $actual ); … … 793 803 */ 794 804 public function assertSameSetsWithIndex( $expected, $actual, $message = '' ) { 805 $this->assertIsArray( $expected, $message . ' Expected value must be an array.' ); 806 $this->assertIsArray( $actual, $message . ' Value under test is not an array.' ); 807 795 808 ksort( $expected ); 796 809 ksort( $actual ); … … 809 822 */ 810 823 public function assertEqualSetsWithIndex( $expected, $actual, $message = '' ) { 824 $this->assertIsArray( $expected, $message . ' Expected value must be an array.' ); 825 $this->assertIsArray( $actual, $message . ' Value under test is not an array.' ); 826 811 827 ksort( $expected ); 812 828 ksort( $actual );
Note: See TracChangeset
for help on using the changeset viewer.