File tree 1 file changed +17
-0
lines changed
1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -1215,6 +1215,23 @@ public function dontSeeFormErrors()
1215
1215
);
1216
1216
}
1217
1217
1218
+ /**
1219
+ * Login with the given user object.
1220
+ * The `$user` object must have a persistent identifier.
1221
+ * If you have more than one firewall or firewall context, you can specify the desired one as a parameter.
1222
+ *
1223
+ * ```php
1224
+ * <?php
1225
+ * $user = $I->grabEntityFromRepository(User::class, [
1226
+ * 'email' => 'john_doe@gmail.com'
1227
+ * ]);
1228
+ * $I->amLoggedInAs($user);
1229
+ * ```
1230
+ *
1231
+ * @param UserInterface $user
1232
+ * @param string $firewallName
1233
+ * @param null $firewallContext
1234
+ */
1218
1235
public function amLoggedInAs (UserInterface $ user , string $ firewallName = 'main ' , $ firewallContext = null )
1219
1236
{
1220
1237
$ session = $ this ->grabService ('session ' );
You can’t perform that action at this time.
0 commit comments