Changeset 851
- Timestamp:
- 08/20/07 20:42:57 (1 year ago)
- Files:
-
- trunk/src/main/php/net/stubbles/xml/serializer/annotations/stubXMLMatcherAnnotation.php (modified) (2 diffs)
- trunk/src/test/php/net/stubbles/xml/XMLTestSuite.php (modified) (1 diff)
- trunk/src/test/php/net/stubbles/xml/serializer (added)
- trunk/src/test/php/net/stubbles/xml/serializer/annotations (added)
- trunk/src/test/php/net/stubbles/xml/serializer/annotations/stubXMLMatcherAnnotationTestCase.php (added)
- trunk/src/test/php/net/stubbles/xml/serializer/stubXMLSerializerStrategyTestCase.php (moved) (moved from trunk/src/test/php/net/stubbles/xml/stubXMLSerializerStrategyTestCase.php)
- trunk/src/test/php/net/stubbles/xml/serializer/stubXMLSerializerTestCase.php (moved) (moved from trunk/src/test/php/net/stubbles/xml/stubXMLSerializerTestCase.php)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/src/main/php/net/stubbles/xml/serializer/annotations/stubXMLMatcherAnnotation.php
r432 r851 48 48 public function getTagnameForProperty(stubReflectionProperty $property, $propertyValue) { 49 49 $matches = array(); 50 if (!preg_match($this->pattern, $property->getName(), $matches)) { 50 $success = @preg_match($this->pattern, $property->getName(), $matches); 51 if ($success === false) { 52 throw new stubXMLException("Syntax error in regular expression '{$this->pattern}': {$php_errormsg}"); 53 } 54 if (empty($matches)) { 51 55 return false; 52 56 } … … 65 69 public function getTagnameForMethod(stubReflectionMethod $method, $returnValue) { 66 70 $matches = array(); 67 if (!preg_match($this->pattern, $method->getName(), $matches)) { 71 $success = preg_match($this->pattern, $method->getName(), $matches); 72 if ($success === false) { 73 throw new stubXMLException("Syntax error in regular expression '{$this->pattern}': {$php_errormsg}"); 74 } 75 if (empty($matches)) { 68 76 return false; 69 77 } trunk/src/test/php/net/stubbles/xml/XMLTestSuite.php
r730 r851 26 26 $this->addTestFile($dir . '/stubDomXMLStreamWriterTestCase.php'); 27 27 $this->addTestFile($dir . '/stubLibXmlXMLStreamWriterTestCase.php'); 28 $this->addTestFile($dir . '/stubXMLSerializerTestCase.php'); 29 $this->addTestFile($dir . '/stubXMLSerializerStrategyTestCase.php'); 28 29 // serializer 30 $this->addTestFile($dir . '/serializer/stubXMLSerializerTestCase.php'); 31 $this->addTestFile($dir . '/serializer/stubXMLSerializerStrategyTestCase.php'); 32 $this->addTestFile($dir . '/serializer/annotations/stubXMLMatcherAnnotationTestCase.php'); 30 33 31 34 // rss
