Skip to content

Commit fbf5806

Browse files
committed
Remove param flags from SeeAuthentication methods
1 parent 3dd2283 commit fbf5806

File tree

1 file changed

+4
-15
lines changed

1 file changed

+4
-15
lines changed

src/Codeception/Module/Symfony.php

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -951,17 +951,13 @@ public function amOnAction(string $action, array $params = [])
951951

952952
/**
953953
* Checks that a user is authenticated.
954-
* You can check users logged in with the option 'remember me' passing true as parameter.
955954
*
956955
* ```php
957956
* <?php
958957
* $I->seeAuthentication();
959-
* $I->seeAuthentication(true);
960958
* ```
961-
*
962-
* @param bool $remembered
963959
*/
964-
public function seeAuthentication(bool $remembered = false)
960+
public function seeAuthentication()
965961
{
966962
$security = $this->grabService('security.helper');
967963

@@ -971,9 +967,7 @@ public function seeAuthentication(bool $remembered = false)
971967
$this->fail('There is no user in session');
972968
}
973969

974-
$role = $remembered ? 'IS_AUTHENTICATED_REMEMBERED' : 'IS_AUTHENTICATED_FULLY';
975-
976-
$this->assertTrue($security->isGranted($role), 'There is no authenticated user');
970+
$this->assertTrue($security->isGranted('IS_AUTHENTICATED_FULLY'), 'There is no authenticated user');
977971
}
978972

979973
/**
@@ -1039,23 +1033,18 @@ public function seeUserHasRole(string $role)
10391033

10401034
/**
10411035
* Check that user is not authenticated.
1042-
* You can specify whether users logged in with the 'remember me' option should be ignored by passing 'false' as a parameter.
10431036
*
10441037
* ```php
10451038
* <?php
10461039
* $I->dontSeeAuthentication();
10471040
* ```
1048-
*
1049-
* @param bool $remembered
10501041
*/
1051-
public function dontSeeAuthentication(bool $remembered = true)
1042+
public function dontSeeAuthentication()
10521043
{
10531044
$security = $this->grabService('security.helper');
10541045

1055-
$role = $remembered ? 'IS_AUTHENTICATED_REMEMBERED' : 'IS_AUTHENTICATED_FULLY';
1056-
10571046
$this->assertFalse(
1058-
$security->isGranted($role),
1047+
$security->isGranted('IS_AUTHENTICATED_FULLY'),
10591048
'There is an user authenticated'
10601049
);
10611050
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy