Changeset 35242 for trunk/tests/phpunit/tests/post/template.php
- Timestamp:
- 10/17/2015 06:02:16 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/post/template.php
r35225 r35242 9 9 $contents = array( 'One', 'Two', 'Three' ); 10 10 $content = join( '<!--nextpage-->', $contents ); 11 $post_id = self:: $factory->post->create( array( 'post_content' => $content ) );11 $post_id = self::factory()->post->create( array( 'post_content' => $content ) ); 12 12 13 13 $this->go_to( '?p=' . $post_id ); … … 82 82 83 83 $bump = ' '; 84 $page_id = self:: $factory->post->create( array( 'post_type' => 'page' ) );85 $child_id = self:: $factory->post->create( array( 'post_type' => 'page', 'post_parent' => $page_id ) );86 $grandchild_id = self:: $factory->post->create( array( 'post_type' => 'page', 'post_parent' => $child_id ) );84 $page_id = self::factory()->post->create( array( 'post_type' => 'page' ) ); 85 $child_id = self::factory()->post->create( array( 'post_type' => 'page', 'post_parent' => $page_id ) ); 86 $grandchild_id = self::factory()->post->create( array( 'post_type' => 'page', 'post_parent' => $child_id ) ); 87 87 88 88 $title1 = get_post( $page_id )->post_title; … … 144 144 */ 145 145 public function test_wp_dropdown_pages_value_field_should_default_to_ID() { 146 $p = self:: $factory->post->create( array(146 $p = self::factory()->post->create( array( 147 147 'post_type' => 'page', 148 148 ) ); … … 160 160 */ 161 161 public function test_wp_dropdown_pages_value_field_ID() { 162 $p = self:: $factory->post->create( array(162 $p = self::factory()->post->create( array( 163 163 'post_type' => 'page', 164 164 ) ); … … 176 176 */ 177 177 public function test_wp_dropdown_pages_value_field_post_name() { 178 $p = self:: $factory->post->create( array(178 $p = self::factory()->post->create( array( 179 179 'post_type' => 'page', 180 180 'post_name' => 'foo', … … 193 193 */ 194 194 public function test_wp_dropdown_pages_value_field_should_fall_back_on_ID_when_an_invalid_value_is_provided() { 195 $p = self:: $factory->post->create( array(195 $p = self::factory()->post->create( array( 196 196 'post_type' => 'page', 197 197 'post_name' => 'foo', … … 210 210 */ 211 211 public function test_wp_dropdown_pages_should_not_contain_class_attribute_when_no_class_is_passed() { 212 $p = self:: $factory->post->create( array(212 $p = self::factory()->post->create( array( 213 213 'post_type' => 'page', 214 214 'post_name' => 'foo', … … 226 226 */ 227 227 public function test_wp_dropdown_pages_should_obey_class_parameter() { 228 $p = self:: $factory->post->create( array(228 $p = self::factory()->post->create( array( 229 229 'post_type' => 'page', 230 230 'post_name' => 'foo', … … 243 243 */ 244 244 public function test_get_page_template_slug_by_id() { 245 $page_id = self:: $factory->post->create( array(245 $page_id = self::factory()->post->create( array( 246 246 'post_type' => 'page', 247 247 ) ); … … 260 260 */ 261 261 public function test_get_page_template_slug_from_loop() { 262 $page_id = self:: $factory->post->create( array(262 $page_id = self::factory()->post->create( array( 263 263 'post_type' => 'page', 264 264 ) ); … … 274 274 */ 275 275 public function test_get_page_template_slug_non_page() { 276 $post_id = self:: $factory->post->create( array(276 $post_id = self::factory()->post->create( array( 277 277 'post_type' => 'post', 278 278 ) ); … … 289 289 */ 290 290 public function test_wp_page_menu_wp_nav_menu_fallback() { 291 $pages = self:: $factory->post->create_many( 3, array( 'post_type' => 'page' ) );291 $pages = self::factory()->post->create_many( 3, array( 'post_type' => 'page' ) ); 292 292 293 293 // No menus + wp_nav_menu() falls back to wp_page_menu().
Note: See TracChangeset
for help on using the changeset viewer.