Changeset 736
- Timestamp:
- 06/14/07 15:38:29 (1 year ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/src/main/php/net/stubbles/ipo/request/broker/annotations/stubStringFilterAnnotation.php
r731 r736 39 39 * @var string 40 40 */ 41 protected $regex = ''; 41 protected $regex = null; 42 43 /** 44 * checks if the regex property is set 45 * 46 * @throws ReflectionException 47 */ 48 public function finish() 49 { 50 if (null === $this->regex) { 51 throw new ReflectionException('Can not use ' . $this->getClassName() . ' without setting the regular expression via regex property.'); 52 } 53 } 42 54 43 55 /** trunk/src/test/php/net/stubbles/ipo/request/broker/annotations/stubStringFilterAnnotationTestCase.php
r731 r736 61 61 $this->assertEqual($stringFilter->getRegexValidator()->getValue(), 'foo'); 62 62 } 63 64 /** 65 * test that finish() works as expected 66 */ 67 public function testFinish() 68 { 69 $this->stringFilterAnnotation->setRegex(); 70 $this->expectException('ReflectionException'); 71 $this->stringFilterAnnotation->finish(); 72 } 63 73 } 64 74 ?>
