mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-10-04 22:57:20 +00:00
Tests: Replace some occurrences of assertEquals() with assertSame().
This ensures that not only the return values match the expected results, but also that their type is the same. Props costdev, desrosj. See #55654. git-svn-id: https://develop.svn.wordpress.org/trunk@54402 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -171,7 +171,7 @@ if ( is_multisite() ) :
|
||||
}
|
||||
wp_update_network_counts();
|
||||
|
||||
$this->assertEquals( $site_count_start, $actual );
|
||||
$this->assertSame( $site_count_start, $actual );
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -191,7 +191,7 @@ if ( is_multisite() ) :
|
||||
}
|
||||
wp_update_network_counts();
|
||||
|
||||
$this->assertEquals( $site_count_start + 1, $actual );
|
||||
$this->assertSame( $site_count_start + 1, $actual );
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -202,11 +202,9 @@ if ( is_multisite() ) :
|
||||
|
||||
$site_count = get_blog_count( self::$different_network_id );
|
||||
|
||||
$this->assertEquals( count( self::$different_site_ids ), $site_count );
|
||||
$this->assertSame( count( self::$different_site_ids ), $site_count );
|
||||
}
|
||||
|
||||
|
||||
|
||||
public function test_active_network_plugins() {
|
||||
$path = 'hello.php';
|
||||
|
||||
|
||||
@@ -1555,9 +1555,9 @@ if ( is_multisite() ) :
|
||||
$result = wp_update_site( $site_id, array( 'public' => 1 ) );
|
||||
$site3 = get_site( $site_id );
|
||||
|
||||
$this->assertEquals( 1, $site1->public );
|
||||
$this->assertEquals( 0, $site2->public );
|
||||
$this->assertEquals( 1, $site3->public );
|
||||
$this->assertSame( '1', $site1->public );
|
||||
$this->assertSame( '0', $site2->public );
|
||||
$this->assertSame( '1', $site3->public );
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2433,7 +2433,7 @@ if ( is_multisite() ) :
|
||||
|
||||
wpmu_create_blog( 'testsite1.example.org', '/new-blog/', 'New Blog', get_current_user_id(), $meta, 1 );
|
||||
|
||||
$this->assertEquals( $expected_meta, $this->wp_initialize_site_meta );
|
||||
$this->assertSameSetsWithIndex( $expected_meta, $this->wp_initialize_site_meta );
|
||||
|
||||
$this->wp_initialize_site_meta = array();
|
||||
}
|
||||
@@ -2534,8 +2534,8 @@ if ( is_multisite() ) :
|
||||
),
|
||||
array(
|
||||
'public' => 0,
|
||||
'WPLANG' => 'en_US',
|
||||
'foo' => 'bar',
|
||||
'WPLANG' => 'en_US',
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user