mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-07 09:49:04 +00:00
Use @expectedDeprecated. see #25282, [25408].
git-svn-id: https://develop.svn.wordpress.org/trunk@25409 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -6,7 +6,6 @@
|
||||
* @group themes
|
||||
*/
|
||||
class Tests_Theme_ThemeDir extends WP_UnitTestCase {
|
||||
protected $deprecated_functions = array( 'get_theme', 'get_themes', 'get_theme_data', 'get_current_theme', 'get_broken_themes' );
|
||||
|
||||
function setUp() {
|
||||
parent::setUp();
|
||||
@@ -40,6 +39,10 @@ class Tests_Theme_ThemeDir extends WP_UnitTestCase {
|
||||
return $this->theme_root;
|
||||
}
|
||||
|
||||
/**
|
||||
* @expectedDeprecated get_theme
|
||||
* @expectedDeprecated get_themes
|
||||
*/
|
||||
function test_theme_default() {
|
||||
$themes = get_themes();
|
||||
$theme = get_theme('WordPress Default');
|
||||
@@ -67,6 +70,10 @@ class Tests_Theme_ThemeDir extends WP_UnitTestCase {
|
||||
$this->assertEquals( '', $theme['Parent Theme'] );
|
||||
}
|
||||
|
||||
/**
|
||||
* @expectedDeprecated get_theme
|
||||
* @expectedDeprecated get_themes
|
||||
*/
|
||||
function test_theme_sandbox() {
|
||||
$theme = get_theme('Sandbox');
|
||||
|
||||
@@ -98,7 +105,11 @@ class Tests_Theme_ThemeDir extends WP_UnitTestCase {
|
||||
|
||||
}
|
||||
|
||||
// a css only theme
|
||||
/**
|
||||
* A CSS-only theme
|
||||
*
|
||||
* @expectedDeprecated get_themes
|
||||
*/
|
||||
function test_theme_stylesheet_only() {
|
||||
$themes = get_themes();
|
||||
|
||||
@@ -126,6 +137,9 @@ class Tests_Theme_ThemeDir extends WP_UnitTestCase {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @expectedDeprecated get_themes
|
||||
*/
|
||||
function test_theme_list() {
|
||||
$themes = get_themes();
|
||||
|
||||
@@ -153,6 +167,10 @@ class Tests_Theme_ThemeDir extends WP_UnitTestCase {
|
||||
$this->assertEquals($expected, $theme_names);
|
||||
}
|
||||
|
||||
/**
|
||||
* @expectedDeprecated get_themes
|
||||
* @expectedDeprecated get_broken_themes
|
||||
*/
|
||||
function test_broken_themes() {
|
||||
$themes = get_themes();
|
||||
$expected = array('broken-theme' => array('Name' => 'broken-theme', 'Title' => 'broken-theme', 'Description' => __('Stylesheet is missing.')));
|
||||
@@ -165,6 +183,9 @@ class Tests_Theme_ThemeDir extends WP_UnitTestCase {
|
||||
$this->assertFalse( wp_get_theme( 'sandbox' )->errors() );
|
||||
}
|
||||
|
||||
/**
|
||||
* @expectedDeprecated get_themes
|
||||
*/
|
||||
function test_page_templates() {
|
||||
$themes = get_themes();
|
||||
|
||||
@@ -175,6 +196,9 @@ class Tests_Theme_ThemeDir extends WP_UnitTestCase {
|
||||
$this->assertTrue( in_array( $this->theme_root . '/page-templates/template-top-level.php', $templates));
|
||||
}
|
||||
|
||||
/**
|
||||
* @expectedDeprecated get_theme_data
|
||||
*/
|
||||
function test_get_theme_data_top_level() {
|
||||
$theme_data = get_theme_data( DIR_TESTDATA . '/themedir1/theme1/style.css' );
|
||||
|
||||
@@ -191,6 +215,9 @@ class Tests_Theme_ThemeDir extends WP_UnitTestCase {
|
||||
$this->assertEquals( 'Minnie Bannister', $theme_data['AuthorName'] );
|
||||
}
|
||||
|
||||
/**
|
||||
* @expectedDeprecated get_theme_data
|
||||
*/
|
||||
function test_get_theme_data_subdir() {
|
||||
$theme_data = get_theme_data( $this->theme_root . '/subdir/theme2/style.css' );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user