mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-05-23 20:54:24 +00:00
Coding Standards: Upgrade WPCS to 1.0.0
WPCS 1.0.0 includes a bunch of new auto-fixers, which drops the number of coding standards issues across WordPress significantly. Prior to running the auto-fixers, there were 15,312 issues detected. With this commit, we now drop to 4,769 issues. This change includes three notable additions: - Multiline function calls must now put each parameter on a new line. - Auto-formatting files is now part of the `grunt precommit` script. - Auto-fixable coding standards issues will now cause Travis failures. Fixes #44600. git-svn-id: https://develop.svn.wordpress.org/trunk@43571 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -68,7 +68,9 @@ class Tests_Import_Parser extends WP_Import_UnitTestCase {
|
||||
'author_display_name' => 'John Doe',
|
||||
'author_first_name' => 'John',
|
||||
'author_last_name' => 'Doe',
|
||||
), $result['authors']['john'], $message
|
||||
),
|
||||
$result['authors']['john'],
|
||||
$message
|
||||
);
|
||||
$this->assertEquals(
|
||||
array(
|
||||
@@ -77,7 +79,9 @@ class Tests_Import_Parser extends WP_Import_UnitTestCase {
|
||||
'category_parent' => '',
|
||||
'cat_name' => 'alpha',
|
||||
'category_description' => 'The alpha category',
|
||||
), $result['categories'][0], $message
|
||||
),
|
||||
$result['categories'][0],
|
||||
$message
|
||||
);
|
||||
$this->assertEquals(
|
||||
array(
|
||||
@@ -85,7 +89,9 @@ class Tests_Import_Parser extends WP_Import_UnitTestCase {
|
||||
'tag_slug' => 'clippable',
|
||||
'tag_name' => 'Clippable',
|
||||
'tag_description' => 'The Clippable post_tag',
|
||||
), $result['tags'][0], $message
|
||||
),
|
||||
$result['tags'][0],
|
||||
$message
|
||||
);
|
||||
$this->assertEquals(
|
||||
array(
|
||||
@@ -95,7 +101,9 @@ class Tests_Import_Parser extends WP_Import_UnitTestCase {
|
||||
'term_parent' => '',
|
||||
'term_name' => 'bieup',
|
||||
'term_description' => 'The bieup post_tax',
|
||||
), $result['terms'][0], $message
|
||||
),
|
||||
$result['terms'][0],
|
||||
$message
|
||||
);
|
||||
|
||||
$this->assertEquals( 2, count( $result['posts'] ), $message );
|
||||
@@ -118,7 +126,9 @@ class Tests_Import_Parser extends WP_Import_UnitTestCase {
|
||||
'slug' => 'bieup',
|
||||
'domain' => 'post_tax',
|
||||
),
|
||||
), $result['posts'][0]['terms'], $message
|
||||
),
|
||||
$result['posts'][0]['terms'],
|
||||
$message
|
||||
);
|
||||
$this->assertEquals(
|
||||
array(
|
||||
@@ -126,7 +136,9 @@ class Tests_Import_Parser extends WP_Import_UnitTestCase {
|
||||
'key' => '_wp_page_template',
|
||||
'value' => 'default',
|
||||
),
|
||||
), $result['posts'][1]['postmeta'], $message
|
||||
),
|
||||
$result['posts'][1]['postmeta'],
|
||||
$message
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -159,7 +171,9 @@ class Tests_Import_Parser extends WP_Import_UnitTestCase {
|
||||
'slug' => 'uncategorized',
|
||||
'domain' => 'category',
|
||||
),
|
||||
), $result['posts'][0]['terms'], $message
|
||||
),
|
||||
$result['posts'][0]['terms'],
|
||||
$message
|
||||
);
|
||||
$this->assertEquals(
|
||||
array(
|
||||
@@ -178,7 +192,9 @@ class Tests_Import_Parser extends WP_Import_UnitTestCase {
|
||||
'slug' => 'roar',
|
||||
'domain' => 'tag',
|
||||
),
|
||||
), $result['posts'][2]['terms'], $message
|
||||
),
|
||||
$result['posts'][2]['terms'],
|
||||
$message
|
||||
);
|
||||
$this->assertEquals(
|
||||
array(
|
||||
@@ -197,7 +213,9 @@ class Tests_Import_Parser extends WP_Import_UnitTestCase {
|
||||
'slug' => 'face',
|
||||
'domain' => 'tag',
|
||||
),
|
||||
), $result['posts'][3]['terms'], $message
|
||||
),
|
||||
$result['posts'][3]['terms'],
|
||||
$message
|
||||
);
|
||||
|
||||
$this->assertEquals(
|
||||
@@ -206,7 +224,9 @@ class Tests_Import_Parser extends WP_Import_UnitTestCase {
|
||||
'key' => '_wp_page_template',
|
||||
'value' => 'default',
|
||||
),
|
||||
), $result['posts'][1]['postmeta'], $message
|
||||
),
|
||||
$result['posts'][1]['postmeta'],
|
||||
$message
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user