Changeset 39095 for trunk/tests/phpunit/tests/post/getBodyClass.php
- Timestamp:
- 11/02/2016 07:22:17 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/post/getBodyClass.php
r38951 r39095 159 159 $this->assertContains( 'post-template-templatescpt-php', $class ); 160 160 } 161 162 /** 163 * @ticket 38225 164 */ 165 public function test_attachment_body_classes() { 166 $post_id = self::factory()->post->create(); 167 168 $attachment_id = self::factory()->attachment->create_object( 'image.jpg', $post_id, array( 169 'post_mime_type' => 'image/jpeg', 170 ) ); 171 172 $this->go_to( get_permalink( $attachment_id ) ); 173 174 $class = get_body_class(); 175 176 $this->assertContains( 'attachment', $class ); 177 $this->assertContains( "attachmentid-{$attachment_id}", $class ); 178 $this->assertContains( 'attachment-jpeg', $class ); 179 } 161 180 }
Note: See TracChangeset
for help on using the changeset viewer.