public function testDependencyWithBadOption() { $this->setExpectedException('Exception'); $this->parser->setString("* @PdInject Apples method setApples force:true"); $this->parser->setInfo('abc'); $this->parser->match(); $this->parser->buildOptions(); }
/** * Pass in a reflection item (class, property, method) * and this function will build a parser and return its * results. * * @param ReflectionClass $classProperty * @return array all options */ private function _optionsFrom($classProperty) { $parser = new Pd_Map_Builder_Parser(); $parser->setString($classProperty->getDocComment()); $parser->setInfo($classProperty); $parser->match(); $parser->buildOptions(); return $parser->getOptions(); }