Skip to content
Browse files

Fixed #863

 * Number of tests to run calculated incorrectly when --repeat is used
  • Loading branch information...
1 parent 2c67e52 commit 407fa090c3da397ae56188750684124ec843f1bf @whatthejeff whatthejeff committed Mar 17, 2013
Showing with 34 additions and 1 deletion.
  1. +5 −0 ChangeLog.md
  2. +4 −1 PHPUnit/TextUI/TestRunner.php
  3. +25 −0 Tests/Regression/GitHub/863.phpt
View
5 ChangeLog.md
@@ -3,6 +3,11 @@ PHPUnit 3.7
This is the list of changes for the PHPUnit 3.7 release series.
+PHPUnit 3.7.19
+--------------
+
+* Fixed #863: Number of tests to run calculated incorrectly when --repeat is used
+
PHPUnit 3.7.18
--------------
View
5 PHPUnit/TextUI/TestRunner.php
@@ -151,14 +151,17 @@ public function doRun(PHPUnit_Framework_Test $suite, array $arguments = array())
}
if (is_integer($arguments['repeat'])) {
- $suite = new PHPUnit_Extensions_RepeatedTest(
+ $test = new PHPUnit_Extensions_RepeatedTest(
$suite,
$arguments['repeat'],
$arguments['filter'],
$arguments['groups'],
$arguments['excludeGroups'],
$arguments['processIsolation']
);
+
+ $suite = new PHPUnit_Framework_TestSuite();
+ $suite->addTest($test);
}
$result = $this->createTestResult();
View
25 Tests/Regression/GitHub/863.phpt
@@ -0,0 +1,25 @@
+--TEST--
+GH-863: Number of tests to run calculated incorrectly when --repeat is used
+--FILE--
+<?php
+
+$_SERVER['argv'][1] = '--no-configuration';
+$_SERVER['argv'][2] = '--repeat';
+$_SERVER['argv'][3] = '50';
+$_SERVER['argv'][4] = 'BankAccountTest';
+$_SERVER['argv'][5] = dirname(dirname(dirname(__FILE__))) . '/_files/BankAccountTest.php';
+
+require_once dirname(dirname(dirname(dirname(__FILE__)))) . '/PHPUnit/Autoload.php';
+PHPUnit_TextUI_Command::main();
+?>
+--EXPECTF--
+PHPUnit %s by Sebastian Bergmann.
+
+............................................................... 63 / 150 ( 42%)
+............................................................... 126 / 150 ( 84%)
+........................
+
+Time: %i %s, Memory: %sMb
+
+OK (150 tests, 150 assertions)
+

0 comments on commit 407fa09

Please sign in to comment.
Something went wrong with that request. Please try again.