mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-07-05 17:50:03 +00:00
Coding Standards: Fix the Squiz.PHP.DisallowMultipleAssignments violations in tests.
See #47632. git-svn-id: https://develop.svn.wordpress.org/trunk@45588 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -161,20 +161,22 @@ class Tests_Query_Conditionals extends WP_UnitTestCase {
|
||||
// '(about)/trackback/?$' => 'index.php?pagename=$matches[1]&tb=1'
|
||||
function test_page_trackback() {
|
||||
$page_ids = array();
|
||||
$page_ids[] = $page_id = self::factory()->post->create(
|
||||
$page_id = self::factory()->post->create(
|
||||
array(
|
||||
'post_type' => 'page',
|
||||
'post_title' => 'parent-page',
|
||||
)
|
||||
);
|
||||
$page_ids[] = $page_id = self::factory()->post->create(
|
||||
$page_ids[] = $page_id;
|
||||
$page_id = self::factory()->post->create(
|
||||
array(
|
||||
'post_type' => 'page',
|
||||
'post_title' => 'child-page-1',
|
||||
'post_parent' => $page_id,
|
||||
)
|
||||
);
|
||||
$page_ids[] = $page_id = self::factory()->post->create(
|
||||
$page_ids[] = $page_id;
|
||||
$page_ids[] = self::factory()->post->create(
|
||||
array(
|
||||
'post_type' => 'page',
|
||||
'post_title' => 'child-page-2',
|
||||
@@ -197,20 +199,22 @@ class Tests_Query_Conditionals extends WP_UnitTestCase {
|
||||
//'(about)/feed/(feed|rdf|rss|rss2|atom)/?$' => 'index.php?pagename=$matches[1]&feed=$matches[2]'
|
||||
function test_page_feed() {
|
||||
$page_ids = array();
|
||||
$page_ids[] = $page_id = self::factory()->post->create(
|
||||
$page_id = self::factory()->post->create(
|
||||
array(
|
||||
'post_type' => 'page',
|
||||
'post_title' => 'parent-page',
|
||||
)
|
||||
);
|
||||
$page_ids[] = $page_id = self::factory()->post->create(
|
||||
$page_ids[] = $page_id;
|
||||
$page_id = self::factory()->post->create(
|
||||
array(
|
||||
'post_type' => 'page',
|
||||
'post_title' => 'child-page-1',
|
||||
'post_parent' => $page_id,
|
||||
)
|
||||
);
|
||||
$page_ids[] = $page_id = self::factory()->post->create(
|
||||
$page_ids[] = $page_id;
|
||||
$page_ids[] = self::factory()->post->create(
|
||||
array(
|
||||
'post_type' => 'page',
|
||||
'post_title' => 'child-page-2',
|
||||
@@ -233,20 +237,22 @@ class Tests_Query_Conditionals extends WP_UnitTestCase {
|
||||
|
||||
function test_page_feed_with_no_comments() {
|
||||
$page_ids = array();
|
||||
$page_ids[] = $page_id = self::factory()->post->create(
|
||||
$page_id = self::factory()->post->create(
|
||||
array(
|
||||
'post_type' => 'page',
|
||||
'post_title' => 'parent-page',
|
||||
)
|
||||
);
|
||||
$page_ids[] = $page_id = self::factory()->post->create(
|
||||
$page_ids[] = $page_id;
|
||||
$page_id = self::factory()->post->create(
|
||||
array(
|
||||
'post_type' => 'page',
|
||||
'post_title' => 'child-page-1',
|
||||
'post_parent' => $page_id,
|
||||
)
|
||||
);
|
||||
$page_ids[] = $page_id = self::factory()->post->create(
|
||||
$page_ids[] = $page_id;
|
||||
$page_ids[] = self::factory()->post->create(
|
||||
array(
|
||||
'post_type' => 'page',
|
||||
'post_title' => 'child-page-2',
|
||||
@@ -269,20 +275,22 @@ class Tests_Query_Conditionals extends WP_UnitTestCase {
|
||||
// '(about)/feed/(feed|rdf|rss|rss2|atom)/?$' => 'index.php?pagename=$matches[1]&feed=$matches[2]'
|
||||
function test_page_feed_atom() {
|
||||
$page_ids = array();
|
||||
$page_ids[] = $page_id = self::factory()->post->create(
|
||||
$page_id = self::factory()->post->create(
|
||||
array(
|
||||
'post_type' => 'page',
|
||||
'post_title' => 'parent-page',
|
||||
)
|
||||
);
|
||||
$page_ids[] = $page_id = self::factory()->post->create(
|
||||
$page_ids[] = $page_id;
|
||||
$page_id = self::factory()->post->create(
|
||||
array(
|
||||
'post_type' => 'page',
|
||||
'post_title' => 'child-page-1',
|
||||
'post_parent' => $page_id,
|
||||
)
|
||||
);
|
||||
$page_ids[] = $page_id = self::factory()->post->create(
|
||||
$page_ids[] = $page_id;
|
||||
$page_ids[] = self::factory()->post->create(
|
||||
array(
|
||||
'post_type' => 'page',
|
||||
'post_title' => 'child-page-2',
|
||||
|
||||
Reference in New Issue
Block a user