private function validate($interactorName, $className) { if ($this->has($interactorName)) { throw new InteractorAlreadyDefinedException($interactorName, $className, $this->getInteractorClass($interactorName)); } Assert::classExists($className); Assert::isInteractor($className); }
/** * @test * @expectedException \PhpInteractor\Exception\NonInteractorException */ public function isNotInteractor() { Assert::isInteractor('PhpInteractor\\Tests\\Interactor\\NoInterfaceImplementation'); }