/** * @param $name * @return Feature|null */ public function findByName($name) { return $this->repository->findByName($name); }
function it_throws_exception_when_given_context_is_not_found(Repository $repository, Strategy $strategy) { $feature = new Feature('captcha', $strategy->getWrappedObject()); $repository->findByName('captcha')->willReturn($feature); $this->shouldThrow(new ContextNotFoundException("Context with name 'fffuuuu' was not found."))->during('isActive', array('captcha', 'fffuuuu')); }