Exemplo n.º 1
0
 public function __construct(array $config = [])
 {
     $config = array_replace_recursive(['ext' => '.dirk.html', 'cache' => '.', 'echo' => 'htmlspecialchars(%s, ENT_QUOTES, \'UTF-8\')'], $config);
     $this->cache = isset($config['cache']) ? $config['cache'] : '.';
     $this->echoFormat = isset($config['echo']) ? $config['echo'] : '%s';
     parent::__construct($config);
 }
Exemplo n.º 2
0
 /**
  * @covers R2\Templating\PhpEngine::exists
  */
 public function testExists()
 {
     $name = $this->template('dummy');
     $this->assertTrue($this->engine->exists($name));
     $this->assertFalse($this->engine->exists('some-weird-name'));
 }