public function testViewlessRecord()
{
$this->setRequest(Request::create('/pages/test'));
$contentType = $this->getService('storage')->getContentType('pages');
$contentType['viewless'] = true;
$storage = $this->getMockStorage();
$storage->expects($this->once())->method('getContentType')->will($this->returnValue($contentType));
$this->setService('storage', $storage);
$this->setExpectedException('Symfony\\Component\\HttpKernel\\Exception\\HttpException', 'not found');
$response = $this->controller()->record($this->getRequest(), 'pages', 'test');
$this->assertTrue($response instanceof TemplateResponse);
$this->assertSame('record.twig', $response->getTemplate()->getTemplateName());
$this->assertNotEmpty($response->getGlobals());
}