Changeset 51367 for trunk/tests/phpunit/tests/post/formats.php
- Timestamp:
- 07/07/2021 10:32:56 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/post/formats.php
r51331 r51367 14 14 $this->assertNotWPError( $result ); 15 15 $this->assertIsArray( $result ); 16 $this->assert Same( 1, count( $result ));16 $this->assertCount( 1, $result ); 17 17 18 18 $format = get_post_format( $post_id ); … … 22 22 $this->assertNotWPError( $result ); 23 23 $this->assertIsArray( $result ); 24 $this->assert Same( 0, count( $result ));24 $this->assertCount( 0, $result ); 25 25 26 26 $result = set_post_format( $post_id, '' ); 27 27 $this->assertNotWPError( $result ); 28 28 $this->assertIsArray( $result ); 29 $this->assert Same( 0, count( $result ));29 $this->assertCount( 0, $result ); 30 30 } 31 31 … … 42 42 $this->assertNotWPError( $result ); 43 43 $this->assertIsArray( $result ); 44 $this->assert Same( 1, count( $result ));44 $this->assertCount( 1, $result ); 45 45 // The format can be set but not retrieved until it is registered. 46 46 $format = get_post_format( $post_id ); … … 55 55 $this->assertNotWPError( $result ); 56 56 $this->assertIsArray( $result ); 57 $this->assert Same( 0, count( $result ));57 $this->assertCount( 0, $result ); 58 58 59 59 $result = set_post_format( $post_id, '' ); 60 60 $this->assertNotWPError( $result ); 61 61 $this->assertIsArray( $result ); 62 $this->assert Same( 0, count( $result ));62 $this->assertCount( 0, $result ); 63 63 64 64 remove_post_type_support( 'page', 'post-formats' ); … … 74 74 $this->assertNotWPError( $result ); 75 75 $this->assertIsArray( $result ); 76 $this->assert Same( 1, count( $result ));76 $this->assertCount( 1, $result ); 77 77 $this->assertTrue( has_post_format( 'aside', $post_id ) ); 78 78 … … 80 80 $this->assertNotWPError( $result ); 81 81 $this->assertIsArray( $result ); 82 $this->assert Same( 0, count( $result ));82 $this->assertCount( 0, $result ); 83 83 // Standard is a special case. It shows as false when set. 84 84 $this->assertFalse( has_post_format( 'standard', $post_id ) );
Note: See TracChangeset
for help on using the changeset viewer.