$client =
$this->
createClient(['test_case' => 'StandardFormLogin', 'root_config' => 'invalid_ip_access_control.yml'
]);
$client->
request('GET', '/unprotected_resource'
);
} public function testPublicHomepage() { $client =
$this->
createClient(['test_case' => 'StandardFormLogin', 'root_config' => 'base_config.yml'
]);
$client->
request('GET', '/en/'
);
$this->
assertEquals(200,
$client->
getResponse()->
getStatusCode(),
(string) $client->
getResponse());
$this->
assertTrue($client->
getResponse()->headers->
getCacheControlDirective('public'
));
$this->
assertSame(0, self::
getContainer()->
get('request_tracker_subscriber'
)->
getLastRequest()->
getSession()->
getUsageIndex());
} private function assertAllowed($client,
$path) { $client->
request('GET',
$path);
$this->
assertEquals(404,
$client->
getResponse()->
getStatusCode());
} private function assertRestricted($client,
$path) { $client->
request('GET',
$path);