public function getTypeClass() { $class = 'GetOptionKit\\ValueType\\' . ucfirst($this->isa) . 'Type'; if (class_exists($class, true)) { return new $class($this->isaOption); } throw new Exception("Type class '{$class}' not found."); }
/** * @expectedException Exception */ public function testInvalidTypeClass() { $opt = new Option('scope'); $opt->isa('SomethingElse'); $class = $opt->getTypeClass(); }