Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

- Merge [3968].

  • Loading branch information...
commit 5c67c5aceb1f911806a96393f116d49c0990f463 1 parent 1869111
@sebastianbergmann authored
Showing with 19 additions and 3 deletions.
  1. +10 −2 PHPUnit/TextUI/Command.php
  2. +9 −1 PHPUnit/TextUI/TestRunner.php
View
12 PHPUnit/TextUI/Command.php
@@ -93,7 +93,11 @@ public static function main($exit = TRUE)
require_once 'PHPUnit/Util/Skeleton/Test.php';
if (isset($arguments['bootstrap'])) {
- require_once $arguments['bootstrap'];
+ $bootstrapFile = PHPUnit_Util_Filesystem::fileExistsInIncludePath($arguments['bootstrap']);
+
+ if ($bootstrapFile) {
+ require_once $bootstrapFile;
+ }
}
$skeleton = new PHPUnit_Util_Skeleton_Test(
@@ -444,7 +448,11 @@ protected static function handleArguments()
PHPUnit_TextUI_TestRunner::printVersionString();
if (isset($arguments['bootstrap'])) {
- require_once $arguments['bootstrap'];
+ $bootstrapFile = PHPUnit_Util_Filesystem::fileExistsInIncludePath($arguments['bootstrap']);
+
+ if ($bootstrapFile) {
+ require_once $bootstrapFile;
+ }
}
if ($option[0] == '--skeleton-class') {
View
10 PHPUnit/TextUI/TestRunner.php
@@ -154,7 +154,11 @@ public function doRun(PHPUnit_Framework_Test $suite, array $arguments = array())
$this->handleConfiguration($arguments);
if (isset($arguments['bootstrap'])) {
- require_once $arguments['bootstrap'];
+ $bootstrapFile = PHPUnit_Util_Filesystem::fileExistsInIncludePath($arguments['bootstrap']);
+
+ if ($bootstrapFile) {
+ require_once $bootstrapFile;
+ }
}
if (is_integer($arguments['repeat'])) {
@@ -631,6 +635,10 @@ protected function handleConfiguration(array &$arguments)
$phpunitConfiguration = $arguments['configuration']->getPHPUnitConfiguration();
+ if (isset($phpunitConfiguration['bootstrap']) && !isset($arguments['bootstrap'])) {
+ $arguments['bootstrap'] = $phpunitConfiguration['bootstrap'];
+ }
+
if (isset($phpunitConfiguration['colors']) && !isset($arguments['colors'])) {
$arguments['colors'] = $phpunitConfiguration['colors'];
}
Please sign in to comment.
Something went wrong with that request. Please try again.