FluidTYPO3\Flux\Tests\Unit\View\ExposedTemplateViewTest::getParsedTemplateReturnsCompiledTemplateIfFound PHP Method

getParsedTemplateReturnsCompiledTemplateIfFound() public method

    public function getParsedTemplateReturnsCompiledTemplateIfFound()
    {
        $instance = $this->getMock($this->createInstanceClassName(), array('getTemplateIdentifier'));
        $instance->expects($this->once())->method('getTemplateIdentifier');
        $compiler = $this->getMock('TYPO3\\CMS\\Fluid\\Core\\Compiler\\TemplateCompiler', array('has', 'get'));
        $compiler->expects($this->once())->method('has')->willReturn(TRUE);
        $compiler->expects($this->once())->method('get')->willReturn('foobar');
        ObjectAccess::setProperty($instance, 'templateCompiler', $compiler, TRUE);
        $result = $this->callInaccessibleMethod($instance, 'getParsedTemplate');
        $this->assertEquals('foobar', $result);
    }