From 12e325582af06aec8c8952ece9b0c796352a9114 Mon Sep 17 00:00:00 2001 From: Scott Taylor Date: Mon, 9 Jun 2014 15:58:16 +0000 Subject: [PATCH] Update unit tests to reflect: * [28673] - title attributes are no longer expected to be present in some assertions * [28704] - Fix `Declaration of Tests_Canonical_HTTPS::test() should be compatible with Tests_Canonical::test($test_url, $expected, $ticket = 0)` * [28679] - Add `@expectedDeprecated get_all_category_ids` git-svn-id: https://develop.svn.wordpress.org/trunk@28706 602fd350-edb4-49c9-b593-d223f7449a82 --- tests/phpunit/tests/admin/includesPlugin.php | 6 +++--- tests/phpunit/tests/canonical/https.php | 2 +- tests/phpunit/tests/category.php | 2 ++ tests/phpunit/tests/theme/themeDir.php | 8 ++++---- 4 files changed, 10 insertions(+), 8 deletions(-) diff --git a/tests/phpunit/tests/admin/includesPlugin.php b/tests/phpunit/tests/admin/includesPlugin.php index bb09d783b5..9a0cbc95d4 100644 --- a/tests/phpunit/tests/admin/includesPlugin.php +++ b/tests/phpunit/tests/admin/includesPlugin.php @@ -9,10 +9,10 @@ class Tests_Admin_includesPlugin extends WP_UnitTestCase { $default_headers = array( 'Name' => 'Hello Dolly', - 'Title' => 'Hello Dolly', + 'Title' => 'Hello Dolly', 'PluginURI' => 'http://wordpress.org/#', - 'Description' => 'This is not just a plugin, it symbolizes the hope and enthusiasm of an entire generation summed up in two words sung most famously by Louis Armstrong: Hello, Dolly. When activated you will randomly see a lyric from Hello, Dolly in the upper right of your admin screen on every page. By Matt Mullenweg.', - 'Author' => 'Matt Mullenweg', + 'Description' => 'This is not just a plugin, it symbolizes the hope and enthusiasm of an entire generation summed up in two words sung most famously by Louis Armstrong: Hello, Dolly. When activated you will randomly see a lyric from Hello, Dolly in the upper right of your admin screen on every page. By Matt Mullenweg.', + 'Author' => 'Matt Mullenweg', 'AuthorURI' => 'http://ma.tt/', 'Version' => '1.5.1', 'TextDomain' => 'hello-dolly', diff --git a/tests/phpunit/tests/canonical/https.php b/tests/phpunit/tests/canonical/https.php index 0f55b79b1a..7b3063c5f2 100644 --- a/tests/phpunit/tests/canonical/https.php +++ b/tests/phpunit/tests/canonical/https.php @@ -15,7 +15,7 @@ class Tests_Canonical_HTTPS extends Tests_Canonical { $this->https = set_url_scheme( home_url( 'sample-page/' ), 'https' ); } - public function test() { + public function test( $test_url, $expected, $ticket = 0 ) { // Nothing } diff --git a/tests/phpunit/tests/category.php b/tests/phpunit/tests/category.php index 71a267bf34..47ea937596 100644 --- a/tests/phpunit/tests/category.php +++ b/tests/phpunit/tests/category.php @@ -17,6 +17,8 @@ class Tests_Category extends WP_UnitTestCase { /** * Validate get_all_category_ids + * + * @expectedDeprecated get_all_category_ids */ function test_get_all_category_ids() { // create categories diff --git a/tests/phpunit/tests/theme/themeDir.php b/tests/phpunit/tests/theme/themeDir.php index a1081e4189..d6762c1f8c 100644 --- a/tests/phpunit/tests/theme/themeDir.php +++ b/tests/phpunit/tests/theme/themeDir.php @@ -55,7 +55,7 @@ class Tests_Theme_ThemeDir extends WP_UnitTestCase { $this->assertEquals( 'WordPress Default', $theme['Name'] ); $this->assertEquals( 'WordPress Default', $theme['Title'] ); $this->assertEquals( 'The default WordPress theme based on the famous Kubrick.', $theme['Description'] ); - $this->assertEquals( 'Michael Heilemann', $theme['Author'] ); + $this->assertEquals( 'Michael Heilemann', $theme['Author'] ); $this->assertEquals( '1.6', $theme['Version'] ); $this->assertEquals( 'default', $theme['Template'] ); $this->assertEquals( 'default', $theme['Stylesheet'] ); @@ -121,7 +121,7 @@ class Tests_Theme_ThemeDir extends WP_UnitTestCase { $this->assertEquals( 'Stylesheet Only', $theme['Name'] ); $this->assertEquals( 'Stylesheet Only', $theme['Title'] ); $this->assertEquals( 'A three-column widget-ready theme in dark blue.', $theme['Description'] ); - $this->assertEquals( 'Henry Crun', $theme['Author'] ); + $this->assertEquals( 'Henry Crun', $theme['Author'] ); $this->assertEquals( '1.0', $theme['Version'] ); $this->assertEquals( 'sandbox', $theme['Template'] ); $this->assertEquals( 'stylesheetonly', $theme['Stylesheet'] ); @@ -205,7 +205,7 @@ class Tests_Theme_ThemeDir extends WP_UnitTestCase { $this->assertEquals( 'My Theme', $theme_data['Name'] ); $this->assertEquals( 'http://example.org/', $theme_data['URI'] ); $this->assertEquals( 'An example theme', $theme_data['Description'] ); - $this->assertEquals( 'Minnie Bannister', $theme_data['Author'] ); + $this->assertEquals( 'Minnie Bannister', $theme_data['Author'] ); $this->assertEquals( 'http://example.com/', $theme_data['AuthorURI'] ); $this->assertEquals( '1.3', $theme_data['Version'] ); $this->assertEquals( '', $theme_data['Template'] ); @@ -224,7 +224,7 @@ class Tests_Theme_ThemeDir extends WP_UnitTestCase { $this->assertEquals( 'My Subdir Theme', $theme_data['Name'] ); $this->assertEquals( 'http://example.org/', $theme_data['URI'] ); $this->assertEquals( 'An example theme in a sub directory', $theme_data['Description'] ); - $this->assertEquals( 'Mr. WordPress', $theme_data['Author'] ); + $this->assertEquals( 'Mr. WordPress', $theme_data['Author'] ); $this->assertEquals( 'http://wordpress.org/', $theme_data['AuthorURI'] ); $this->assertEquals( '0.1', $theme_data['Version'] ); $this->assertEquals( '', $theme_data['Template'] );