Пример #1
0
 public function testGetAnnotations()
 {
     $expectedAnnotations = array('var');
     $annotations = $this->refProp->getAnnotations();
     ReflectionTestHelper::expectedAnnotations($expectedAnnotations, $annotations, $this);
     $annotations = $this->refProp->getAnnotations('var');
     ReflectionTestHelper::expectedAnnotations($expectedAnnotations, $annotations, $this);
 }
Пример #2
0
 public function testGetAnnotations()
 {
     $func = $this->fctM1;
     $annotations = $func->getAnnotations();
     $expectedAnnotations = array('webmethod', 'author', 'param', 'param', 'param', 'return');
     ReflectionTestHelper::expectedAnnotations($expectedAnnotations, $annotations, $this);
     $func = $this->fctM2;
     $annotations = $func->getAnnotations();
     $expectedAnnotations = array('param', 'param', 'author');
     ReflectionTestHelper::expectedAnnotations($expectedAnnotations, $annotations, $this);
 }
Пример #3
0
 public function testGetAnnotations()
 {
     $class = new ezcReflectionClass('ezcReflectionClass');
     $method = $class->getMethod('getMethod');
     $annotations = $method->getAnnotations();
     self::assertEquals(3, count($annotations));
     $annotations = $this->fctM4->getAnnotations();
     $expectedAnnotations = array('webmethod', 'restmethod', 'restin', 'restout', 'author', 'param', 'param', 'param', 'return');
     ReflectionTestHelper::expectedAnnotations($expectedAnnotations, $annotations, $this);
     $annotations = $this->fctM4->getAnnotations('param');
     $expectedAnnotations = array('param', 'param', 'param');
     ReflectionTestHelper::expectedAnnotations($expectedAnnotations, $annotations, $this);
     $method = $this->fctM1;
     $annotations = $method->getAnnotations();
     $expectedAnnotations = array('param', 'author');
     ReflectionTestHelper::expectedAnnotations($expectedAnnotations, $annotations, $this);
 }
Пример #4
0
 public function testGetAnnotations()
 {
     $annotations = $this->class->getAnnotations();
     $expectedAnnotations = array('licence', 'donotdocument', 'testclass', 'ignore');
     ReflectionTestHelper::expectedAnnotations($expectedAnnotations, $annotations, $this);
     $expectedAnnotations = array('webservice', 'foobar');
     $annotations = $this->classTestWebservice->getAnnotations();
     ReflectionTestHelper::expectedAnnotations($expectedAnnotations, $annotations, $this);
 }