Skip to content

Commit a219184

Browse files
committed
Added dontSeeRememberedAuthentication function
1 parent d267b7c commit a219184

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

src/Codeception/Module/Symfony.php

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1022,6 +1022,24 @@ public function seeRememberedAuthentication()
10221022
$this->assertTrue($security->isGranted('IS_AUTHENTICATED_REMEMBERED'), 'There is no authenticated user');
10231023
}
10241024

1025+
/**
1026+
* Check that user is not authenticated with the 'remember me' option.
1027+
*
1028+
* ```php
1029+
* <?php
1030+
* $I->dontSeeRememberedAuthentication();
1031+
* ```
1032+
*/
1033+
public function dontSeeRememberedAuthentication()
1034+
{
1035+
$security = $this->grabService('security.helper');
1036+
1037+
$this->assertFalse(
1038+
$security->isGranted('IS_AUTHENTICATED_REMEMBERED'),
1039+
'There is an user authenticated'
1040+
);
1041+
}
1042+
10251043
/**
10261044
* Check that the current user has a role
10271045
*

0 commit comments

Comments
 (0)