File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -1001,6 +1001,27 @@ public function submitSymfonyForm(string $name, array $fields)
1001
1001
$ this ->submitForm ($ selector , $ params , $ button );
1002
1002
}
1003
1003
1004
+ /**
1005
+ * Checks that a user is authenticated with the 'remember me' option.
1006
+ *
1007
+ * ```php
1008
+ * <?php
1009
+ * $I->seeRememberedAuthentication();
1010
+ * ```
1011
+ */
1012
+ public function seeRememberedAuthentication ()
1013
+ {
1014
+ $ security = $ this ->grabService ('security.helper ' );
1015
+
1016
+ $ user = $ security ->getUser ();
1017
+
1018
+ if (!$ user ) {
1019
+ $ this ->fail ('There is no user in session ' );
1020
+ }
1021
+
1022
+ $ this ->assertTrue ($ security ->isGranted ('IS_AUTHENTICATED_REMEMBERED ' ), 'There is no authenticated user ' );
1023
+ }
1024
+
1004
1025
/**
1005
1026
* Check that the current user has a role
1006
1027
*
You can’t perform that action at this time.
0 commit comments