Changeset 687
- Timestamp:
- 03/16/08 15:13:03 (10 months ago)
- Location:
- DocTest/trunk
- Files:
-
- 4 added
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
DocTest/trunk/src/PHPT/DocTest/Generator.php
r683 r687 31 31 $reflection = new ReflectionClass($callback); 32 32 } 33 $docblock = new PHPT_DocTest_DocBlock($reflection->getDocComment());33 $docblock = $this->_createDocBlock($reflection); 34 34 $parser = new PHPT_DocTest_Parser($docblock); 35 35 36 36 file_put_contents($this->_test_path . '/' . $callback . '-1.phpt', (string)$parser); 37 37 } 38 39 private function _createDocBlock($reflection) 40 { 41 $raw = $reflection->getDocComment(); 42 if (empty($raw)) { 43 throw new PHPT_DocTest_Generator_NoDocblockException(); 44 } 45 return new PHPT_DocTest_DocBlock($raw); 46 } 38 47 } 39 48
