mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 14:20:15 +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:
@@ -48,7 +48,8 @@ class Tests_Post extends WP_UnitTestCase {
|
||||
function _unset_current_user() {
|
||||
global $current_user, $user_ID;
|
||||
|
||||
$current_user = $user_ID = null;
|
||||
$current_user = null;
|
||||
$user_ID = null;
|
||||
}
|
||||
|
||||
// test simple valid behavior: insert and get a post
|
||||
@@ -124,7 +125,8 @@ class Tests_Post extends WP_UnitTestCase {
|
||||
);
|
||||
|
||||
// insert a post and make sure the ID is ok
|
||||
$id = $this->post_ids[] = wp_insert_post( $post );
|
||||
$id = wp_insert_post( $post );
|
||||
$this->post_ids[] = $id;
|
||||
#dmp(_get_cron_array());
|
||||
$this->assertTrue( is_numeric( $id ) );
|
||||
$this->assertTrue( $id > 0 );
|
||||
@@ -158,7 +160,8 @@ class Tests_Post extends WP_UnitTestCase {
|
||||
);
|
||||
|
||||
// insert a post and make sure the ID is ok
|
||||
$id = $this->post_ids[] = wp_insert_post( $post );
|
||||
$id = wp_insert_post( $post );
|
||||
$this->post_ids[] = $id;
|
||||
|
||||
// fetch the post and make sure has the correct date and status
|
||||
$out = get_post( $id );
|
||||
@@ -200,7 +203,8 @@ class Tests_Post extends WP_UnitTestCase {
|
||||
);
|
||||
|
||||
// insert a post and make sure the ID is ok
|
||||
$id = $this->post_ids[] = wp_insert_post( $post );
|
||||
$id = wp_insert_post( $post );
|
||||
$this->post_ids[] = $id;
|
||||
|
||||
// fetch the post and make sure has the correct date and status
|
||||
$out = get_post( $id );
|
||||
@@ -240,7 +244,8 @@ class Tests_Post extends WP_UnitTestCase {
|
||||
);
|
||||
|
||||
// insert a post and make sure the ID is ok
|
||||
$id = $this->post_ids[] = wp_insert_post( $post );
|
||||
$id = wp_insert_post( $post );
|
||||
$this->post_ids[] = $id;
|
||||
#dmp(_get_cron_array());
|
||||
$this->assertTrue( is_numeric( $id ) );
|
||||
$this->assertTrue( $id > 0 );
|
||||
@@ -272,7 +277,8 @@ class Tests_Post extends WP_UnitTestCase {
|
||||
);
|
||||
|
||||
// insert a post and make sure the ID is ok
|
||||
$id = $this->post_ids[] = wp_insert_post( $post );
|
||||
$id = wp_insert_post( $post );
|
||||
$this->post_ids[] = $id;
|
||||
|
||||
// fetch the post and make sure has the correct date and status
|
||||
$out = get_post( $id );
|
||||
@@ -313,7 +319,8 @@ class Tests_Post extends WP_UnitTestCase {
|
||||
);
|
||||
|
||||
// insert a post and make sure the ID is ok
|
||||
$id = $this->post_ids[] = wp_insert_post( $post );
|
||||
$id = wp_insert_post( $post );
|
||||
$this->post_ids[] = $id;
|
||||
|
||||
// fetch the post and make sure has the correct date and status
|
||||
$out = get_post( $id );
|
||||
@@ -353,7 +360,8 @@ class Tests_Post extends WP_UnitTestCase {
|
||||
);
|
||||
|
||||
// insert a post and make sure the ID is ok
|
||||
$id = $this->post_ids[] = wp_insert_post( $post );
|
||||
$id = wp_insert_post( $post );
|
||||
$this->post_ids[] = $id;
|
||||
#dmp(_get_cron_array());
|
||||
$this->assertTrue( is_numeric( $id ) );
|
||||
$this->assertTrue( $id > 0 );
|
||||
@@ -407,7 +415,8 @@ class Tests_Post extends WP_UnitTestCase {
|
||||
);
|
||||
|
||||
// insert a post and make sure the ID is ok
|
||||
$id = $this->post_ids[] = wp_insert_post( $post );
|
||||
$id = wp_insert_post( $post );
|
||||
$this->post_ids[] = $id;
|
||||
|
||||
// fetch the post and make sure has the correct date and status
|
||||
$out = get_post( $id );
|
||||
@@ -511,7 +520,8 @@ class Tests_Post extends WP_UnitTestCase {
|
||||
);
|
||||
|
||||
// insert a post and make sure the ID is ok
|
||||
$id = $this->post_ids[] = wp_insert_post( $post );
|
||||
$id = wp_insert_post( $post );
|
||||
$this->post_ids[] = $id;
|
||||
|
||||
// check that there's a publish_future_post job scheduled at the right time
|
||||
$this->assertEquals( $future_date, $this->_next_schedule_for_post( 'publish_future_post', $id ) );
|
||||
@@ -540,7 +550,8 @@ class Tests_Post extends WP_UnitTestCase {
|
||||
);
|
||||
|
||||
// insert a post and make sure the ID is ok
|
||||
$id = $this->post_ids[] = wp_insert_post( $post );
|
||||
$id = wp_insert_post( $post );
|
||||
$this->post_ids[] = $id;
|
||||
|
||||
$plink = get_permalink( $id );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user