/** * Tests the getValidator() method. * * @return void */ public function testGetValidator() { $sc = new SystemContainer(); try { $sc->getValidator('Mock'); $this->fail('Getting a DAO with an empty search array should result a DiException'); } catch (\YapepBase\Exception\DiException $e) { $this->assertEquals(\YapepBase\Exception\DiException::ERR_NAMESPACE_SEARCH_CLASS_NOT_FOUND, $e->getCode()); } $sc->addSearchNamespace(SystemContainer::NAMESPACE_SEARCH_DAO, '\\YapepBaseTest\\Mock\\Dao'); $this->assertInstanceOf('\\YapepBase\\Dao\\DaoAbstract', $sc->getDao('Mock')); }