mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 14:20:15 +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:
@@ -421,7 +421,7 @@ class Tests_Auth extends WP_UnitTestCase {
|
||||
'user_email' => "mail\'@example.com",
|
||||
'user_pass' => 'password',
|
||||
);
|
||||
$this->factory()->user->create( $user_args );
|
||||
self::factory()->user->create( $user_args );
|
||||
|
||||
$_POST['log'] = $user_args['user_email'];
|
||||
$_POST['pwd'] = $user_args['user_pass'];
|
||||
@@ -436,7 +436,7 @@ class Tests_Auth extends WP_UnitTestCase {
|
||||
* @covers ::wp_validate_application_password
|
||||
*/
|
||||
public function test_application_password_authentication() {
|
||||
$user_id = $this->factory()->user->create(
|
||||
$user_id = self::factory()->user->create(
|
||||
array(
|
||||
'user_login' => 'http_auth_login',
|
||||
'user_pass' => 'http_auth_pass', // Shouldn't be allowed for API login.
|
||||
|
||||
Reference in New Issue
Block a user