Changeset 51367 for trunk/tests/phpunit/tests/import/import.php
- Timestamp:
- 07/07/2021 10:32:56 AM (5 years ago)
- File:
-
- 1 edited
-
trunk/tests/phpunit/tests/import/import.php (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/import/import.php
r50463 r51367 86 86 ) 87 87 ); 88 $this->assert Same( 11, count( $posts ));88 $this->assertCount( 11, $posts ); 89 89 90 90 $post = $posts[0]; … … 96 96 $this->assertSame( 0, $post->post_parent ); 97 97 $cats = wp_get_post_categories( $post->ID ); 98 $this->assert Same( 27, count( $cats ));98 $this->assertCount( 27, $cats ); 99 99 100 100 $post = $posts[1]; … … 106 106 $this->assertSame( 0, $post->post_parent ); 107 107 $cats = wp_get_post_categories( $post->ID ); 108 $this->assert Same( 1, count( $cats ));108 $this->assertCount( 1, $cats ); 109 109 $this->assertTrue( has_post_format( 'aside', $post->ID ) ); 110 110 … … 117 117 $this->assertSame( 0, $post->post_parent ); 118 118 $cats = wp_get_post_categories( $post->ID, array( 'fields' => 'all' ) ); 119 $this->assert Same( 1, count( $cats ));119 $this->assertCount( 1, $cats ); 120 120 $this->assertSame( 'foo', $cats[0]->slug ); 121 121 … … 128 128 $this->assertSame( 0, $post->post_parent ); 129 129 $cats = wp_get_post_categories( $post->ID, array( 'fields' => 'all' ) ); 130 $this->assert Same( 1, count( $cats ));130 $this->assertCount( 1, $cats ); 131 131 $this->assertSame( 'foo-bar', $cats[0]->slug ); 132 132 … … 139 139 $this->assertSame( 0, $post->post_parent ); 140 140 $cats = wp_get_post_categories( $post->ID ); 141 $this->assert Same( 1, count( $cats ));141 $this->assertCount( 1, $cats ); 142 142 $tags = wp_get_post_tags( $post->ID ); 143 $this->assert Same( 3, count( $tags ));143 $this->assertCount( 3, $tags ); 144 144 $this->assertSame( 'tag1', $tags[0]->slug ); 145 145 $this->assertSame( 'tag2', $tags[1]->slug ); … … 199 199 $this->assertSame( 0, $post->post_parent ); 200 200 $cats = wp_get_post_categories( $post->ID ); 201 $this->assert Same( 1, count( $cats ));201 $this->assertCount( 1, $cats ); 202 202 } 203 203
Note: See TracChangeset
for help on using the changeset viewer.