/** * @expectedException \RuntimeException * @expectedExceptionMessage No engine is able to work with the template "template.php" */ public function testGetInvalidEngine() { $firstEngine = $this->getEngineMock('template.php', false); $secondEngine = $this->getEngineMock('template.php', false); $delegatingEngine = new DelegatingEngine(array($firstEngine, $secondEngine)); $delegatingEngine->getEngine('template.php', array('foo' => 'bar')); }
/** * {@inheritdoc} */ public function getEngine($name) { $this->resolveEngines(); return parent::getEngine($name); }