use Symfony\Component\Security\Http\Authenticator\Passport\Passport;
use Symfony\Component\Security\Http\Authenticator\Passport\SelfValidatingPassport;
class AbstractLoginFormAuthenticatorTest extends TestCase
{ /**
* @dataProvider provideSupportsData
*/
public function testSupports(string
$loginUrl, Request
$request, bool
$expected) { $authenticator =
new ConcreteFormAuthenticator($loginUrl);
$this->
assertSame($expected,
$authenticator->
supports($request));
} public static function provideSupportsData(): iterable
{ yield [ '/login',
Request::
create('http://localhost/login', Request::METHOD_POST,
[],
[],
[],
[ 'DOCUMENT_ROOT' => '/var/www/app/public',
'PHP_SELF' => '/index.php',
'SCRIPT_FILENAME' => '/var/www/app/public/index.php',
'SCRIPT_NAME' => '/index.php',
]),