mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-10-04 14:47:02 +00:00
Tests: Use the factory method instead of the property.
This replaces all references to the `WP_UnitTestCase_Base::$factory` property with static function calls to the `WP_UnitTestCase_Base::factory()` method. This is a consistency improvement for the test suite. Follow up to [35225], [35242], [49603], [54087], [54088]. Props jrf. See #55652. git-svn-id: https://develop.svn.wordpress.org/trunk@54090 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -13,7 +13,7 @@ if ( is_multisite() ) :
|
||||
* @ticket 40036
|
||||
*/
|
||||
public function test_option_should_not_be_empty_by_default() {
|
||||
$blog_id = $this->factory->blog->create();
|
||||
$blog_id = self::factory()->blog->create();
|
||||
|
||||
switch_to_blog( $blog_id );
|
||||
|
||||
@@ -39,7 +39,7 @@ if ( is_multisite() ) :
|
||||
update_site_option( 'first_page', '' );
|
||||
update_site_option( 'first_comment', '' );
|
||||
|
||||
$blog_id = $this->factory->blog->create();
|
||||
$blog_id = self::factory()->blog->create();
|
||||
|
||||
switch_to_blog( $blog_id );
|
||||
|
||||
@@ -65,7 +65,7 @@ if ( is_multisite() ) :
|
||||
update_site_option( 'first_page', 'Some page content' );
|
||||
update_site_option( 'first_comment', 'Some comment content' );
|
||||
|
||||
$blog_id = $this->factory->blog->create();
|
||||
$blog_id = self::factory()->blog->create();
|
||||
|
||||
switch_to_blog( $blog_id );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user