public function testAuthenticationIsNeeded()
{
$this->logout();
$client = static::createClient();
$this->loadFixtures($client, array('Backend\\Modules\\Blog\\DataFixtures\\LoadBlogCategories', 'Backend\\Modules\\Blog\\DataFixtures\\LoadBlogPosts'));
$client->setMaxRedirects(1);
$client->request('GET', '/private/en/blog/edit?id=1');
// we should get redirected to authentication with a reference to the wanted page
self::assertStringEndsWith('/private/en/authentication?querystring=%2Fprivate%2Fen%2Fblog%2Fedit%3Fid%3D1', $client->getHistory()->current()->getUri());
}