Changeset 39168 for trunk/tests/phpunit/tests/admin/includesTheme.php
- Timestamp:
- 11/08/2016 10:40:28 PM (9 years ago)
- File:
-
- 1 edited
-
trunk/tests/phpunit/tests/admin/includesTheme.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/admin/includesTheme.php
r38951 r39168 86 86 $this->assertEquals( array(), get_page_templates( null, 'bar' ) ); 87 87 } 88 89 /** 90 * @ticket 38696 91 */ 92 function test_page_templates_child_theme() { 93 $theme = wp_get_theme( 'page-templates-child' ); 94 $this->assertNotEmpty( $theme ); 95 96 switch_theme( $theme['Template'], $theme['Stylesheet'] ); 97 98 $this->assertEqualSetsWithIndex( array( 99 'Top Level' => 'template-top-level-post-types.php', 100 'Sub Dir' => 'subdir/template-sub-dir-post-types.php', 101 ), get_page_templates( null, 'foo' ) ); 102 $this->assertEqualSetsWithIndex( array( 103 'Top Level' => 'template-top-level-post-types.php', 104 'Sub Dir' => 'subdir/template-sub-dir-post-types.php', 105 ), get_page_templates( null, 'post' ) ); 106 $this->assertEqualSetsWithIndex( array( 107 'Top Level' => 'template-top-level.php', 108 'Sub Dir' => 'subdir/template-sub-dir.php', 109 'This Template Header Is On One Line' => 'template-header.php', 110 ), get_page_templates() ); 111 $this->assertEquals( array(), get_page_templates( null, 'bar' ) ); 112 } 88 113 }
Note: See TracChangeset
for help on using the changeset viewer.