Permalink
Browse files

- Merge [4687].

  • Loading branch information...
1 parent ed364b3 commit dd1ca517a90fe5b8e75a038d64e19e623d7e7305 @sebastianbergmann committed Feb 26, 2009
@@ -159,11 +159,11 @@ public function expectOutputString($expectedString)
}
/**
- * @param mixed $dependencyInput
+ * @param array $dependencyInput
* @return mixed
* @throws RuntimeException
*/
- protected function runTest($dependencyInput = NULL)
+ protected function runTest(array $dependencyInput = array())
{
ob_start();
@@ -71,11 +71,11 @@
protected $maxRunningTime = 0;
/**
- * @param mixed $dependencyInput
+ * @param array $dependencyInput
* @return mixed
* @throws RuntimeException
*/
- protected function runTest($dependencyInput = NULL)
+ protected function runTest(array $dependencyInput = array())
{
PHPUnit_Util_Timer::start();
$testResult = parent::runTest($dependencyInput);
@@ -372,10 +372,10 @@ protected function getDriver(array $browser)
}
/**
- * @param mixed $dependencyInput
+ * @param array $dependencyInput
* @throws RuntimeException
*/
- protected function runTest($dependencyInput = NULL)
+ protected function runTest(array $dependencyInput = array())
{
$this->start();
@@ -161,11 +161,11 @@ protected function _and($contextOrOutcome)
/**
* Run this test's scenario.
*
- * @param mixed $dependencyInput
+ * @param array $dependencyInput
* @return mixed
* @throws RuntimeException
*/
- protected function runTest($dependencyInput = NULL)
+ protected function runTest(array $dependencyInput = array())
{
$autostop = $this->autoStop;
$this->autoStop = FALSE;
@@ -179,11 +179,11 @@ protected function _and($contextOrOutcome)
/**
* Run this test's scenario.
*
- * @param mixed $dependencyInput
+ * @param array $dependencyInput
* @return mixed
* @throws RuntimeException
*/
- protected function runTest($dependencyInput = NULL)
+ protected function runTest(array $dependencyInput = array())
{
$testResult = parent::runTest($dependencyInput);
$this->scenario->run($this->world);
@@ -638,11 +638,10 @@ public function run(PHPUnit_Framework_TestResult $result = NULL)
/**
* Runs the bare test sequence.
- *
*/
public function runBare()
{
- $dependencyInput = NULL;
+ $dependencyInput = array();
$this->numAssertions = 0;
if (!empty($this->dependencies)) {
@@ -664,7 +663,7 @@ public function runBare()
)
);
} else {
- $dependencyInput = $passed[$dependency];
+ $dependencyInput[] = $passed[$dependency];
}
}
}
@@ -773,11 +772,11 @@ public function runBare()
/**
* Override to run the test and assert its state.
*
- * @param mixed $dependencyInput
+ * @param array $dependencyInput
* @return mixed
* @throws RuntimeException
*/
- protected function runTest($dependencyInput = NULL)
+ protected function runTest(array $dependencyInput = array())
{
if ($this->name === NULL) {
throw new RuntimeException(
@@ -796,11 +795,7 @@ protected function runTest($dependencyInput = NULL)
try {
if (empty($this->data)) {
- if ($dependencyInput !== NULL) {
- $testResult = $method->invoke($this, $dependencyInput);
- } else {
- $testResult = $method->invoke($this);
- }
+ $testResult = $method->invokeArgs($this, $dependencyInput);
} else {
$testResult = $method->invokeArgs($this, $this->data);
}
@@ -80,10 +80,10 @@ public function __construct($message = '')
}
/**
- * @param mixed $dependencyInput
+ * @param array $dependencyInput
* @throws RuntimeException
*/
- protected function runTest($dependencyInput = NULL)
+ protected function runTest(array $dependencyInput = array())
{
$this->fail($this->message);
}
@@ -1,7 +1,7 @@
<?php
class Error extends PHPUnit_Framework_TestCase
{
- protected function runTest($dependencyInput = NULL)
+ protected function runTest(array $dependencyInput = array())
{
throw new Exception;
}
@@ -1,7 +1,7 @@
<?php
class Failure extends PHPUnit_Framework_TestCase
{
- protected function runTest($dependencyInput = NULL)
+ protected function runTest(array $dependencyInput = array())
{
$this->fail();
}
@@ -1,7 +1,7 @@
<?php
class Success extends PHPUnit_Framework_TestCase
{
- protected function runTest($dependencyInput = NULL)
+ protected function runTest(array $dependencyInput = array())
{
}
}
@@ -8,7 +8,7 @@ protected function tearDown()
$this->tornDown = TRUE;
}
- protected function runTest($dependencyInput = NULL)
+ protected function runTest(array $dependencyInput = array())
{
throw new Exception;
}
@@ -9,7 +9,7 @@ protected function tearDown()
throw new Exception;
}
- protected function runTest($dependencyInput = NULL)
+ protected function runTest(array $dependencyInput = array())
{
throw new Exception;
}
@@ -3,7 +3,7 @@ class WasRun extends PHPUnit_Framework_TestCase
{
public $wasRun = FALSE;
- protected function runTest($dependencyInput = NULL)
+ protected function runTest(array $dependencyInput = array())
{
$this->wasRun = TRUE;
}

0 comments on commit dd1ca51

Please sign in to comment.