Changeset 40559
- Timestamp:
- 04/30/2017 11:18:43 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/template.php
r40558 r40559 195 195 196 196 public function test_page_template_hierarchy() { 197 $this->assertEquals( 'templates/page.php', get_page_template_slug( self::$page ) );198 197 $this->assertTemplateHierarchy( get_permalink( self::$page ), array( 199 198 'templates/page.php', … … 210 209 */ 211 210 public function test_single_template_hierarchy_for_post() { 212 $this->assertEquals( 'templates/post.php', get_page_template_slug( self::$post ) );213 211 $this->assertTemplateHierarchy( get_permalink( self::$post ), array( 214 212 'templates/post.php', … … 246 244 add_post_meta( $cpt->ID, '_wp_page_template', 'templates/cpt.php' ); 247 245 248 $this->assertEquals( 'templates/cpt.php', get_page_template_slug( $cpt ) );249 246 $this->assertTemplateHierarchy( get_permalink( $cpt ), array( 250 247 'templates/cpt.php', … … 286 283 ) ); 287 284 288 add_post_meta( $attachment->ID, '_wp_page_template', 'templates/attachment.php' ); 289 290 $this->assertEquals( 'templates/attachment.php', get_page_template_slug( $attachment ) ); 285 add_post_meta( $attachment, '_wp_page_template', 'templates/cpt.php' ); 286 291 287 $this->assertTemplateHierarchy( get_permalink( $attachment ), array( 292 'templates/attachment.php',293 288 'image-jpeg.php', 294 289 'jpeg.php',
Note: See TracChangeset
for help on using the changeset viewer.