Permalink
Browse files

Merge branch '3.7'

  • Loading branch information...
2 parents 604aaba + 407fa09 commit cb669257d894eb4239282a89d52326d3b28d6b94 @whatthejeff whatthejeff committed Mar 18, 2013
Showing with 29 additions and 1 deletion.
  1. +4 −1 PHPUnit/TextUI/TestRunner.php
  2. +25 −0 Tests/Regression/GitHub/863.phpt
@@ -185,11 +185,14 @@ 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['processIsolation']
);
+
+ $suite = new PHPUnit_Framework_TestSuite();
+ $suite->addTest($test);
}
$result = $this->createTestResult();
@@ -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 cb66925

Please sign in to comment.