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
This commit is contained in:
Scott Taylor
2014-06-09 15:58:16 +00:00
parent 69384c40a3
commit 12e325582a
4 changed files with 10 additions and 8 deletions

View File

@@ -9,10 +9,10 @@ class Tests_Admin_includesPlugin extends WP_UnitTestCase {
$default_headers = array(
'Name' => 'Hello Dolly',
'Title' => '<a href="http://wordpress.org/#" title="Visit plugin homepage">Hello Dolly</a>',
'Title' => '<a href="http://wordpress.org/#">Hello Dolly</a>',
'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. <cite>By <a href="http://ma.tt/" title="Visit author homepage">Matt Mullenweg</a>.</cite>',
'Author' => '<a href="http://ma.tt/" title="Visit author homepage">Matt Mullenweg</a>',
'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. <cite>By <a href="http://ma.tt/">Matt Mullenweg</a>.</cite>',
'Author' => '<a href="http://ma.tt/">Matt Mullenweg</a>',
'AuthorURI' => 'http://ma.tt/',
'Version' => '1.5.1',
'TextDomain' => 'hello-dolly',

View File

@@ -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
}

View File

@@ -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

View File

@@ -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 <a href="http://binarybonsai.com/kubrick/">Kubrick</a>.', $theme['Description'] );
$this->assertEquals( '<a href="http://binarybonsai.com/" title="Visit author homepage">Michael Heilemann</a>', $theme['Author'] );
$this->assertEquals( '<a href="http://binarybonsai.com/">Michael Heilemann</a>', $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( '<a href="http://www.example.com/" title="Visit author homepage">Henry Crun</a>', $theme['Author'] );
$this->assertEquals( '<a href="http://www.example.com/">Henry Crun</a>', $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( '<a href="http://example.com/" title="Visit author homepage">Minnie Bannister</a>', $theme_data['Author'] );
$this->assertEquals( '<a href="http://example.com/">Minnie Bannister</a>', $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( '<a href="http://wordpress.org/" title="Visit author homepage">Mr. WordPress</a>', $theme_data['Author'] );
$this->assertEquals( '<a href="http://wordpress.org/">Mr. WordPress</a>', $theme_data['Author'] );
$this->assertEquals( 'http://wordpress.org/', $theme_data['AuthorURI'] );
$this->assertEquals( '0.1', $theme_data['Version'] );
$this->assertEquals( '', $theme_data['Template'] );