From 961adfb51eb8dde252062e0f9774759a12dd4729 Mon Sep 17 00:00:00 2001 From: Scott Taylor Date: Wed, 11 Sep 2013 18:39:09 +0000 Subject: [PATCH] Update the unit test methods in `Tests_Admin_includesTheme`. Use `wp_get_theme()` instead of `get_theme()`. See #25282. git-svn-id: https://develop.svn.wordpress.org/trunk@25355 602fd350-edb4-49c9-b593-d223f7449a82 --- tests/phpunit/tests/admin/includesTheme.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tests/phpunit/tests/admin/includesTheme.php b/tests/phpunit/tests/admin/includesTheme.php index 78f750dda4..a0b45e7ac2 100644 --- a/tests/phpunit/tests/admin/includesTheme.php +++ b/tests/phpunit/tests/admin/includesTheme.php @@ -40,15 +40,15 @@ class Tests_Admin_includesTheme extends WP_UnitTestCase { * @ticket 11216 */ function test_page_templates() { - $theme = get_theme('Page Template Theme'); - $this->assertFalse( empty($theme) ); + $theme = wp_get_theme( 'page-templates' ); + $this->assertNotEmpty( $theme ); - switch_theme($theme['Template'], $theme['Stylesheet']); + switch_theme( $theme['Template'], $theme['Stylesheet'] ); $templates = get_page_templates(); - $this->assertEquals(3, count($templates)); - $this->assertEquals("template-top-level.php", $templates['Top Level']); - $this->assertEquals("subdir/template-sub-dir.php", $templates['Sub Dir']); - $this->assertEquals("template-header.php", $templates['This Template Header Is On One Line']); + $this->assertCount( 3, $templates ); + $this->assertEquals( "template-top-level.php", $templates['Top Level'] ); + $this->assertEquals( "subdir/template-sub-dir.php", $templates['Sub Dir'] ); + $this->assertEquals( "template-header.php", $templates['This Template Header Is On One Line'] ); } }