/** * @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); $container = $this->getContainerMock(array('engine.first' => $firstEngine, 'engine.second' => $secondEngine)); $delegatingEngine = new DelegatingEngine($container, array('engine.first', 'engine.second')); $delegatingEngine->getEngine('template.php', array('foo' => 'bar')); }