public function testLoginUsersWithMultipleFirewalls(string
$username, string
$firewallContext) { $client =
$this->
createClient(['test_case' => 'Authenticator', 'root_config' => 'multiple_firewall_user_provider.yml'
]);
$client->
request('GET', '/main/login/check'
);
$client->
request('POST', '/'.
$firewallContext.'/login/check',
[ '_username' =>
$username,
'_password' => 'test',
]);
$this->
assertResponseRedirects('/'.
$firewallContext.'/user_profile'
);
$client->
request('GET', '/'.
$firewallContext.'/user_profile'
);
$this->
assertEquals('Welcome '.
$username.'!',
$client->
getResponse()->
getContent());
} public static function provideEmailsWithFirewalls() { yield ['jane@example.org', 'main'
];
yield ['john@example.org', 'custom'
];
}