forked from wallabag/wallabag
Move site config from property to parameter in LoginFormAuthenticator
This commit is contained in:
@ -35,8 +35,8 @@ class LoginFormAuthenticatorTest extends TestCase
|
||||
'password' => 'unkn0wn',
|
||||
]);
|
||||
|
||||
$auth = new LoginFormAuthenticator($siteConfig);
|
||||
$res = $auth->login($guzzle);
|
||||
$auth = new LoginFormAuthenticator();
|
||||
$res = $auth->login($siteConfig, $guzzle);
|
||||
|
||||
$this->assertInstanceOf(LoginFormAuthenticator::class, $res);
|
||||
}
|
||||
@ -65,8 +65,8 @@ class LoginFormAuthenticatorTest extends TestCase
|
||||
'password' => 'unkn0wn',
|
||||
]);
|
||||
|
||||
$auth = new LoginFormAuthenticator($siteConfig);
|
||||
$res = $auth->login($guzzle);
|
||||
$auth = new LoginFormAuthenticator();
|
||||
$res = $auth->login($siteConfig, $guzzle);
|
||||
|
||||
$this->assertInstanceOf(LoginFormAuthenticator::class, $res);
|
||||
}
|
||||
@ -128,8 +128,8 @@ class LoginFormAuthenticatorTest extends TestCase
|
||||
'password' => 'unkn0wn',
|
||||
]);
|
||||
|
||||
$auth = new LoginFormAuthenticator($siteConfig);
|
||||
$res = $auth->login($client);
|
||||
$auth = new LoginFormAuthenticator();
|
||||
$res = $auth->login($siteConfig, $client);
|
||||
|
||||
$this->assertInstanceOf(LoginFormAuthenticator::class, $res);
|
||||
}
|
||||
@ -194,8 +194,8 @@ class LoginFormAuthenticatorTest extends TestCase
|
||||
'password' => 'unkn0wn',
|
||||
]);
|
||||
|
||||
$auth = new LoginFormAuthenticator($siteConfig);
|
||||
$res = $auth->login($client);
|
||||
$auth = new LoginFormAuthenticator();
|
||||
$res = $auth->login($siteConfig, $client);
|
||||
|
||||
$this->assertInstanceOf(LoginFormAuthenticator::class, $res);
|
||||
}
|
||||
@ -210,8 +210,8 @@ class LoginFormAuthenticatorTest extends TestCase
|
||||
'password' => 'unkn0wn',
|
||||
]);
|
||||
|
||||
$auth = new LoginFormAuthenticator($siteConfig);
|
||||
$loginRequired = $auth->isLoginRequired(file_get_contents(__DIR__ . '/../../fixtures/nextinpact-login.html'));
|
||||
$auth = new LoginFormAuthenticator();
|
||||
$loginRequired = $auth->isLoginRequired($siteConfig, file_get_contents(__DIR__ . '/../../fixtures/nextinpact-login.html'));
|
||||
|
||||
$this->assertFalse($loginRequired);
|
||||
}
|
||||
@ -227,8 +227,8 @@ class LoginFormAuthenticatorTest extends TestCase
|
||||
'notLoggedInXpath' => '//h2[@class="title_reserve_article"]',
|
||||
]);
|
||||
|
||||
$auth = new LoginFormAuthenticator($siteConfig);
|
||||
$loginRequired = $auth->isLoginRequired(file_get_contents(__DIR__ . '/../../fixtures/nextinpact-article.html'));
|
||||
$auth = new LoginFormAuthenticator();
|
||||
$loginRequired = $auth->isLoginRequired($siteConfig, file_get_contents(__DIR__ . '/../../fixtures/nextinpact-article.html'));
|
||||
|
||||
$this->assertTrue($loginRequired);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user