Changeset 21343
- Timestamp:
- 08/22/09 20:40:36 (4 years ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
tools/lime/branches/2.0-experimental/lib/LimeTest.php
r21342 r21343 22 22 $output = null, 23 23 $options = array(), 24 $errorReporting = true, 24 25 $expectedException = null, 25 26 $expectedCode = null, … … 69 70 set_error_handler(array($this, 'handleError')); 70 71 set_exception_handler(array($this, 'handleException')); 72 } 73 74 public function setErrorReporting($enabled) 75 { 76 $this->errorReporting = $enabled; 71 77 } 72 78 … … 606 612 public function handleError($code, $message, $file, $line, $context) 607 613 { 608 switch ($code) 609 { 610 case E_WARNING: 611 $message = 'Warning: '.$message; 612 break; 613 case E_NOTICE: 614 $message = 'Notice: '.$message; 615 break; 616 } 617 618 $this->output->warning($message, $file, $line); 614 if ($this->errorReporting) 615 { 616 switch ($code) 617 { 618 case E_WARNING: 619 $message = 'Warning: '.$message; 620 break; 621 case E_NOTICE: 622 $message = 'Notice: '.$message; 623 break; 624 } 625 626 $this->output->warning($message, $file, $line); 627 } 619 628 620 629 return true;