Mantis - Quercus
|
|||||
Viewing Issue Advanced Details | |||||
|
|||||
ID: | Category: | Severity: | Reproducibility: | Date Submitted: | Last Update: |
3312 | block | always | 01-30-09 18:45 | 02-04-09 21:41 | |
|
|||||
Reporter: | koreth | Platform: | |||
Assigned To: | nam | OS: | |||
Priority: | normal | OS Version: | |||
Status: | closed | Product Version: | 4.0.0 | ||
Product Build: | Resolution: | fixed | |||
Projection: | none | ||||
ETA: | none | Fixed in Version: | 4.0.0 | ||
|
|||||
Summary: | 0003312: PHPUnit data providers don't work (can't find annotation) | ||||
Description: |
http://sebastian-bergmann.de/archives/702-Data-Providers-in-PHPUnit-3.2.html [^] describes PHPUnit's data provider interface. <?php include_once 'PHPUnit/Framework.php'; include_once 'PHPUnit/TextUI/ResultPrinter.php'; class MyTest extends PHPUnit_Framework_TestCase { public static function provider() { return array(array(1,2,4), array(4,5,6)); } /** * @dataProvider provider */ public function testAddition($a,$b,$c) { $this->assertEquals($c, $a+$b+1); } } $suite = new PHPUnit_Framework_TestSuite('MyTest'); $result = new PHPUnit_Framework_TestResult; $printer = new PHPUnit_TextUI_ResultPrinter; $result->addListener($printer); $result = $suite->run($result); $result->flushListeners(); $printer->printResult($result); Under regular PHP, this runs the test method twice; the first time passes and the second fails. Under Quercus, I get three "Warning: required argument missing" messages and the test is only run once. Apparently the PHPUnit framework is not able to detect the @dataProvider annotation. |
||||
Steps To Reproduce: | |||||
Additional Information: | |||||
Relationships | |||||
Attached Files: |
Notes | |||||
|
|||||
|
|