increase token column width
add some range to time() assertions
This commit is contained in:
parent
8cc5f6036f
commit
aa85edd224
|
@ -176,7 +176,7 @@ trait BasicStructure {
|
|||
* @param string $user
|
||||
*/
|
||||
public function loggingInUsingWebAs($user) {
|
||||
$loginUrl = substr($this->baseUrl, 0, -5);
|
||||
$loginUrl = substr($this->baseUrl, 0, -5) . '/login';
|
||||
// Request a new session and extract CSRF token
|
||||
$client = new Client();
|
||||
$response = $client->get(
|
||||
|
|
|
@ -157,7 +157,6 @@ class LoginController extends Controller {
|
|||
}
|
||||
|
||||
/**
|
||||
* @NoCSRFRequired
|
||||
* @PublicPage
|
||||
* @UseSession
|
||||
*
|
||||
|
@ -177,7 +176,7 @@ class LoginController extends Controller {
|
|||
}
|
||||
}
|
||||
if ($loginResult) {
|
||||
return new RedirectResponse($this->urlGenerator->linkToRoute('login#showLoginForm'));
|
||||
return new RedirectResponse($this->urlGenerator->linkToRoute('core.login.showLoginForm'));
|
||||
}
|
||||
$this->userSession->createSessionToken($this->request, $user, $password);
|
||||
if (!is_null($redirect_url) && $this->userSession->isLoggedIn()) {
|
||||
|
|
|
@ -1076,7 +1076,7 @@
|
|||
<type>text</type>
|
||||
<default></default>
|
||||
<notnull>true</notnull>
|
||||
<length>100</length>
|
||||
<length>200</length>
|
||||
</field>
|
||||
|
||||
<field>
|
||||
|
|
|
@ -277,7 +277,7 @@ class LoginControllerTest extends TestCase {
|
|||
->will($this->returnValue(false));
|
||||
$this->urlGenerator->expects($this->once())
|
||||
->method('linkToRoute')
|
||||
->with('login#showLoginForm')
|
||||
->with('core.login.showLoginForm')
|
||||
->will($this->returnValue($loginPageUrl));
|
||||
|
||||
$this->userSession->expects($this->never())
|
||||
|
|
|
@ -59,7 +59,7 @@ class Session extends \Test\TestCase {
|
|||
->will($this->returnValue(true));
|
||||
$session->expects($this->at(2))
|
||||
->method('set')
|
||||
->with('last_login_check', time());
|
||||
->with('last_login_check', $this->equalTo(time(), 10));
|
||||
|
||||
$session->expects($this->at(3))
|
||||
->method('get')
|
||||
|
@ -70,7 +70,7 @@ class Session extends \Test\TestCase {
|
|||
->with($token);
|
||||
$session->expects($this->at(4))
|
||||
->method('set')
|
||||
->with('last_token_update', time());
|
||||
->with('last_token_update', $this->equalTo(time(), 10));
|
||||
|
||||
$manager->expects($this->any())
|
||||
->method('get')
|
||||
|
|
Loading…
Reference in New Issue