Bolt\Tests\Controller\FrontendTest::testViewlessRecord PHP Method

testViewlessRecord() public method

public testViewlessRecord ( )
    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());
    }