Bolt\Tests\Controller\FrontendTest::testRecordNoTemplate PHP Метод

testRecordNoTemplate() публичный Метод

    public function testRecordNoTemplate()
    {
        $this->setRequest(Request::create('/pages/', 'GET', ['id' => 5]));
        $storage = $this->getMockStorage();
        $storage->expects($this->at(0))->method('getContent')->will($this->returnValue(false));
        $this->setService('storage', $storage);
        $this->setExpectedException('Symfony\\Component\\HttpKernel\\Exception\\HttpException', 'not found');
        $response = $this->controller()->record($this->getRequest(), 'pages');
        $this->assertTrue($response instanceof TemplateResponse);
        $this->assertSame('record.twig', $response->getTemplate()->getTemplateName());
        $this->assertNotEmpty($response->getGlobals());
    }