Contao\CoreBundle\Test\Controller\InsertTagsControllerTest::testRenderNonCacheableInsertTag PHP Method

testRenderNonCacheableInsertTag() public method

Tests the renderNonCacheableInsertTag() action.
    public function testRenderNonCacheableInsertTag()
    {
        $insertTagAdapter = $this->getMockBuilder('Contao\\CoreBundle\\Framework\\Adapter')->setMethods(['replace'])->disableOriginalConstructor()->getMock();
        $insertTagAdapter->expects($this->any())->method('replace')->willReturn('3858f62230ac3c915f300c664312c63f');
        $controller = new InsertTagsController($this->mockFramework($insertTagAdapter));
        $response = $controller->renderAction('{{request_token}}');
        $this->assertInstanceOf('Symfony\\Component\\HttpFoundation\\Response', $response);
        $this->assertTrue($response->headers->hasCacheControlDirective('private'));
        $this->assertSame('3858f62230ac3c915f300c664312c63f', $response->getContent());
    }