Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

- Merge [1210].

  • Loading branch information...
commit 3b9531da2baefaa6d59b67c3c139fdf503507608 1 parent a3dfd3b
@sebastianbergmann authored
View
19 PHPUnit/Extensions/RepeatedTest.php
@@ -65,6 +65,12 @@
class PHPUnit_Extensions_RepeatedTest extends PHPUnit_Extensions_TestDecorator
{
/**
+ * @var mixed
+ * @access private
+ */
+ private $filter = FALSE;
+
+ /**
* @var integer
* @access private
*/
@@ -74,11 +80,12 @@ class PHPUnit_Extensions_RepeatedTest extends PHPUnit_Extensions_TestDecorator
* Constructor.
*
* @param PHPUnit_Framework_Test $test
- * @param integer $timesRepeat
+ * @param integer $timesRepeat
+ * @param mixed $filter
* @throws InvalidArgumentException
* @access public
*/
- public function __construct(PHPUnit_Framework_Test $test, $timesRepeat = 1)
+ public function __construct(PHPUnit_Framework_Test $test, $timesRepeat = 1, $filter = FALSE)
{
parent::__construct($test);
@@ -90,6 +97,8 @@ public function __construct(PHPUnit_Framework_Test $test, $timesRepeat = 1)
'Argument 2 must be a positive integer.'
);
}
+
+ $this->filter = $filter;
}
/**
@@ -120,7 +129,11 @@ public function run(PHPUnit_Framework_TestResult $result = NULL)
}
for ($i = 0; $i < $this->timesRepeat && !$result->shouldStop(); $i++) {
- $this->test->run($result);
+ if ($this->test instanceof PHPUnit_Framework_TestSuite) {
+ $this->test->run($result, $this->filter);
+ } else {
+ $this->test->run($result);
+ }
}
return $result;
View
4 PHPUnit/TextUI/TestRunner.php
@@ -175,7 +175,9 @@ public function doRun(PHPUnit_Framework_Test $suite, array $parameters = array()
$parameters['wait'] = isset($parameters['wait']) ? $parameters['wait'] : FALSE;
if (is_integer($parameters['repeat'])) {
- $suite = new PHPUnit_Extensions_RepeatedTest($suite, $parameters['repeat']);
+ $suite = new PHPUnit_Extensions_RepeatedTest(
+ $suite, $arguments['repeat'], $arguments['filter']
+ );
}
if (isset($parameters['reportDirectory'])) {
Please sign in to comment.
Something went wrong with that request. Please try again.