public function testLayouts()
{
$client = $this->createClient();
$this->app['crud.layout'] = 'layout.twig';
$this->app['crud.layout.book'] = 'layoutBook.twig';
$this->app['crud.layout.create'] = 'layoutCreate.twig';
$this->app['crud.layout.show.library'] = 'layoutLibraryShow.twig';
$library = $this->dataLibrary->createEmpty();
$library->set('name', 'lib a');
$this->dataLibrary->create($library);
$crawler = $client->request('GET', '/crud/library');
$this->assertTrue($client->getResponse()->isOk());
$this->assertCount(1, $crawler->filter('html:contains("Base layout")'));
$crawler = $client->request('GET', '/crud/book');
$this->assertTrue($client->getResponse()->isOk());
$this->assertCount(1, $crawler->filter('html:contains("Book layout")'));
$crawler = $client->request('GET', '/crud/library/create');
$this->assertTrue($client->getResponse()->isOk());
$this->assertCount(1, $crawler->filter('html:contains("Create layout")'));
$crawler = $client->request('GET', '/crud/library/1');
$this->assertTrue($client->getResponse()->isOk());
$this->assertCount(1, $crawler->filter('html:contains("Library show layout")'));
}