/** * @test */ public function testGetTemplateSourceReadsStreamWrappers() { $fixture = __DIR__ . '/Fixtures/LayoutFixture.html'; $instance = new TemplatePaths(); $stream = fopen($fixture, 'r'); $instance->setTemplateSource($stream); $this->assertEquals(stream_get_contents($stream), $instance->getTemplateSource()); fclose($stream); }
/** * @test */ public function testGetTemplateSourceThrowsExceptionIfFileNotFound() { $instance = new TemplatePaths(); $this->setExpectedException('TYPO3Fluid\\Fluid\\View\\Exception\\InvalidTemplateResourceException'); $instance->getTemplateSource(); }