mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-10-06 15:47:05 +00:00
Tests: Correctly use the factory method.
This replaces all non-static calls to the `WP_UnitTestCase_Base::factory()` method with static function calls, since the method is declared as static. This is a consistency improvement for the test suite. Follow up to [35225], [35242], [49603], [54087]. Props jrf. See #55652. git-svn-id: https://develop.svn.wordpress.org/trunk@54088 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -561,7 +561,7 @@ if ( is_multisite() ) :
|
||||
$new_network_id = $this->_get_next_network_id();
|
||||
$this->assertNull( get_network( $new_network_id ) );
|
||||
|
||||
$new_network = $this->factory()->network->create_and_get();
|
||||
$new_network = self::factory()->network->create_and_get();
|
||||
|
||||
// Double-check we got the ID of the new network correct.
|
||||
$this->assertSame( $new_network_id, $new_network->id );
|
||||
|
||||
@@ -2459,7 +2459,7 @@ if ( is_multisite() ) :
|
||||
$new_site_id = $this->_get_next_site_id();
|
||||
$this->assertNull( get_site( $new_site_id ) );
|
||||
|
||||
$new_site = $this->factory()->blog->create_and_get();
|
||||
$new_site = self::factory()->blog->create_and_get();
|
||||
|
||||
// Double-check we got the ID of the new site correct.
|
||||
$this->assertEquals( $new_site_id, $new_site->blog_id );
|
||||
|
||||
Reference in New Issue
Block a user