/** * Get a repository by its name * * @param string $name * @return \PhraseanetSDK\Repository\RepositoryInterface */ public function getRepository($name) { if (isset($this->repositories[$name])) { return $this->repositories[$name]; } $this->repositories[$name] = RepoFactory::build($name, $this); return $this->repositories[$name]; }
/** * @expectedException PhraseanetSDK\Exception\InvalidArgumentException */ public function testExceptionFactory() { $em = $this->getMock('PhraseanetSDK\\EntityManager', array(), array(), '', false); RepoFactory::build('unknow_class_type', $em); }