public function testGetTemplate() { $sc = new SystemContainer(); $sc->setSearchNamespaces(SystemContainer::NAMESPACE_SEARCH_TEMPLATE, array()); try { $sc->getTemplate('Mock'); $this->fail('Getting a template with an empty search array should result in a ViewException'); } catch (\YapepBase\Exception\ViewException $e) { $this->assertEquals(\YapepBase\Exception\ViewException::ERR_TEMPLATE_NOT_FOUND, $e->getCode()); } $sc->addSearchNamespace(SystemContainer::NAMESPACE_SEARCH_TEMPLATE, '\\YapepBaseTest\\Mock\\View'); $this->assertInstanceOf('\\YapepBase\\View\\TemplateAbstract', $sc->getTemplate('Mock')); }