mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 22:30:04 +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:
@@ -1696,7 +1696,7 @@ class Tests_User extends WP_UnitTestCase {
|
||||
reset_phpmailer_instance();
|
||||
$was_confirmation_email_sent = false;
|
||||
|
||||
$user = $this->factory()->user->create_and_get(
|
||||
$user = self::factory()->user->create_and_get(
|
||||
array(
|
||||
'user_email' => 'before@example.com',
|
||||
)
|
||||
@@ -1733,7 +1733,7 @@ class Tests_User extends WP_UnitTestCase {
|
||||
reset_phpmailer_instance();
|
||||
$was_confirmation_email_sent = false;
|
||||
|
||||
$user = $this->factory()->user->create_and_get(
|
||||
$user = self::factory()->user->create_and_get(
|
||||
array(
|
||||
'user_email' => 'before@example.com',
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user