increase token column width

add some range to time() assertions
This commit is contained in:
Christoph Wurst 2016-04-28 11:59:26 +02:00 committed by Thomas Müller
parent 8cc5f6036f
commit aa85edd224
No known key found for this signature in database
GPG Key ID: A943788A3BBEC44C
5 changed files with 6 additions and 7 deletions

View File

@ -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(

View File

@ -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()) {

View File

@ -1076,7 +1076,7 @@
<type>text</type>
<default></default>
<notnull>true</notnull>
<length>100</length>
<length>200</length>
</field>
<field>

View File

@ -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())

View File

@ -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')