public function testDisplay_this() { file_put_contents($this->file, '<?php echo $lorem ?> <?php echo $var_this ?>'); $finder = $this->getMockFinder(); $finder->expects($this->once())->method("findPath")->with($this->equalTo("search.ext"))->will($this->returnValue($this->file)); $this->expectOutputString("Lorem Ipsum"); $tpl = new \r8\Template\PHP($finder, "search.ext"); $tpl->set("lorem", "Lorem"); $tpl->set("this", "Ipsum"); $tpl->display(); }