Changeset 42343 for trunk/tests/phpunit/tests/post/getBodyClass.php
- Timestamp:
- 11/30/2017 11:09:33 PM (8 years ago)
- File:
-
- 1 edited
-
trunk/tests/phpunit/tests/post/getBodyClass.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/post/getBodyClass.php
r39095 r42343 60 60 public function test_with_utf8_term_slugs() { 61 61 register_taxonomy( 'wptests_tax', 'post' ); 62 $term_id1 = self::factory()->term->create( array( 'taxonomy' => 'wptests_tax', 'name' => 'Первая метка' ) ); 63 $term_id2 = self::factory()->term->create( array( 'taxonomy' => 'wptests_tax', 'name' => 'Вторая метка' ) ); 64 $term_id3 = self::factory()->term->create( array( 'taxonomy' => 'wptests_tax', 'name' => '25кадр' ) ); 62 $term_id1 = self::factory()->term->create( 63 array( 64 'taxonomy' => 'wptests_tax', 65 'name' => 'Первая метка', 66 ) 67 ); 68 $term_id2 = self::factory()->term->create( 69 array( 70 'taxonomy' => 'wptests_tax', 71 'name' => 'Вторая метка', 72 ) 73 ); 74 $term_id3 = self::factory()->term->create( 75 array( 76 'taxonomy' => 'wptests_tax', 77 'name' => '25кадр', 78 ) 79 ); 65 80 wp_set_post_terms( $this->post_id, array( $term_id1, $term_id2, $term_id3 ), 'wptests_tax' ); 66 81 … … 88 103 89 104 $class = get_body_class(); 90 $this->assertContains( "single-post", $class );105 $this->assertContains( 'single-post', $class ); 91 106 $this->assertContains( "postid-{$post_id}", $class ); 92 $this->assertContains( "single-format-standard", $class );107 $this->assertContains( 'single-format-standard', $class ); 93 108 } 94 109 95 110 public function test_page_template_body_classes_no_template() { 96 $post_id = self::factory()->post->create( array( 97 'post_type' => 'page', 98 ) ); 111 $post_id = self::factory()->post->create( 112 array( 113 'post_type' => 'page', 114 ) 115 ); 99 116 $this->go_to( get_permalink( $post_id ) ); 100 117 … … 106 123 107 124 public function test_page_template_body_classes() { 108 $post_id = self::factory()->post->create( array( 109 'post_type' => 'page', 110 ) ); 125 $post_id = self::factory()->post->create( 126 array( 127 'post_type' => 'page', 128 ) 129 ); 111 130 112 131 add_post_meta( $post_id, '_wp_page_template', 'templates/cpt.php' ); … … 126 145 */ 127 146 public function test_page_template_body_classes_attachment() { 128 $post_id = self::factory()->post->create( array( 129 'post_type' => 'attachment', 130 ) ); 147 $post_id = self::factory()->post->create( 148 array( 149 'post_type' => 'attachment', 150 ) 151 ); 131 152 132 153 add_post_meta( $post_id, '_wp_page_template', 'templates/cpt.php' ); … … 166 187 $post_id = self::factory()->post->create(); 167 188 168 $attachment_id = self::factory()->attachment->create_object( 'image.jpg', $post_id, array( 169 'post_mime_type' => 'image/jpeg', 170 ) ); 189 $attachment_id = self::factory()->attachment->create_object( 190 'image.jpg', $post_id, array( 191 'post_mime_type' => 'image/jpeg', 192 ) 193 ); 171 194 172 195 $this->go_to( get_permalink( $attachment_id ) );
Note: See TracChangeset
for help on using the changeset viewer.