Ejemplo n.º 1
0
 /**
  * @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);
 }
Ejemplo n.º 2
0
 /**
  * @test
  */
 public function testGetTemplateSourceThrowsExceptionIfFileNotFound()
 {
     $instance = new TemplatePaths();
     $this->setExpectedException('TYPO3Fluid\\Fluid\\View\\Exception\\InvalidTemplateResourceException');
     $instance->getTemplateSource();
 }