/** * @test */ public function testCreateAnnotationArray() { $array = ['index' => 'value', 1 => true, 'matrix' => ['a' => 'b']]; $annotation1 = $this->createAnnotation('myAnnotationArray1', $array); $annotation2 = $this->createAnnotation('myAnnotationArray2', $array); $bag = new AnnotationBag(); $bag->add($annotation1); $bag->add($annotation2); $result = $this->factory->create($this->getAnnotationArray()); $this->assertEquals($bag, $result); }
/** * @param $className * @param $methodName * @return mixed */ public function readMethod($className, $methodName) { return $this->bagFactory->create((new \ReflectionMethod($className, $methodName))->getDocComment()); }