/** * @covers ::add * @expectedException InvalidArgumentException */ public function testAddInvalid() { $models = new RepoModels(ModelOther::getRepo()); $models->add(new Model()); }
/** * @covers ::setRootRepo * @expectedException LogicException * @expectedExceptionMessage The root repo must be set as inherited (->setInherited(true)) */ public function testRootRepoError1() { $repo = new Repo(__NAMESPACE__ . '\\ModelOther'); $repo->setRootRepo(ModelOther::getRepo()); }