- Timestamp:
- 05/05/08 21:37:13 (5 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/src/main/php/net/stubbles/reflection/annotations/stubAnnotationFactory.php
r1301 r1569 25 25 * @var array 26 26 */ 27 private static $prefixes = array('stub' );27 private static $prefixes = array('stub', ''); 28 28 /** 29 29 * instance of the annotation parser trunk/src/test/php/net/stubbles/reflection/annotations/stubAnnotationFactoryTestCase.php
r1305 r1569 87 87 } 88 88 89 /** 90 * Annotation without "annotation" in its name 91 * 92 * @My(foo='bar') 93 */ 94 class OneMoreTestClass { } 89 95 90 96 /** … … 334 340 $this->fail('Found NonExistingAnnotation while this annotation should not be present.'); 335 341 } 342 343 /** 344 * use the annotation but without any prefix and without the postfix "Annotation" 345 * 346 * @test 347 */ 348 public function noPrefixNoAnnotationInAnnotation() 349 { 350 $class = new stubReflectionClass('OneMoreTestClass'); 351 $this->assertTrue($class->hasAnnotation('My')); 352 $anno = $class->getAnnotation('My'); 353 $this->assertType('MyAnnotation', $anno); 354 $this->assertEquals('bar', $anno->foo); 355 } 336 356 } 337 357 ?>
