$client->request('GET', '/share/'.$content->getId());
$this->assertEquals(302, $client->getResponse()->getStatusCode());
$client->request('GET', '/share/'.$content->getId());
$this->assertEquals(302, $client->getResponse()->getStatusCode());
$crawler = $client->followRedirect();
$this->assertEquals(200, $client->getResponse()->getStatusCode());
$this->assertContains('max-age=25200', $client->getResponse()->headers->get('cache-control'));
$crawler = $client->followRedirect();
$this->assertEquals(200, $client->getResponse()->getStatusCode());
$this->assertContains('max-age=25200', $client->getResponse()->headers->get('cache-control'));
// sharing is now disabled
$client->getContainer()->get('craue_config')->set('share_public', 0);
// sharing is now disabled
$client->getContainer()->get('craue_config')->set('share_public', 0);
$this->assertEquals(404, $client->getResponse()->getStatusCode());
$client->request('GET', '/view/'.$content->getId());
$this->assertEquals(404, $client->getResponse()->getStatusCode());
$client->request('GET', '/view/'.$content->getId());