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