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); }
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); }
public function testGetParameters() { $params = $this->ezc_ezcReflectionMethod_getAnnotations->getParameters(); $expectedParams = array('name'); foreach ($params as $param) { self::assertType('ezcReflectionParameter', $param); self::assertContains($param->getName(), $expectedParams); ReflectionTestHelper::deleteFromArray($param->getName(), $expectedParams); } self::assertEquals(0, count($expectedParams)); }
public function testGetParameters() { $func = new ezcReflectionFunction('m1'); $params = $func->getParameters(); $expected = array('test', 'test2', 'test3'); ReflectionTestHelper::expectedParams($expected, $params, $this); $func = $this->fctM3; $params = $func->getParameters(); self::assertTrue(count($params) == 0); }