/** * Settings pages should not be allowed to access non-authorized users, user should be redirected this time. */ public function testActionsWhenNotLoggedInRedirectToLogin() { $client = $this->client->getClient(); $client->followRedirects(true); $client->request('GET', '/settings/logout'); // Visit settings page. $client->request('GET', '/settings/settings'); // Assert successful redirect when not logged in. $this->assertStringEndsWith('login', $client->getRequest()->getUri(), 'response must be a correct redirect'); }