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\ClassDoesNotExistException */ public function classDoesNotExistExist() { Assert::classExists('\\Non\\Existent\\ClassName'); }