Permalink
Browse files

- Merge [3862].

  • Loading branch information...
1 parent 4bd4dc5 commit 346b6beada61e031d9ff91ee4c868855d1fc4af8 @sebastianbergmann committed Oct 19, 2008
Showing with 17 additions and 12 deletions.
  1. +17 −12 PHPUnit/TextUI/Command.php
View
@@ -227,6 +227,11 @@ protected static function handleArguments()
$arguments['testFile'] = '';
}
+ if (isset($arguments['test']) && is_file($arguments['test'])) {
+ $arguments['testFile'] = realpath($arguments['test']);
+ $arguments['test'] = substr($arguments['test'], 0, strrpos($arguments['test'], '.'));
+ }
+
foreach ($options[0] as $option) {
switch ($option[0]) {
case '--ansi':
@@ -429,22 +434,22 @@ protected static function handleArguments()
case '--skeleton':
case '--skeleton-class':
case '--skeleton-test': {
- if (isset($arguments['bootstrap'])) {
- require_once $arguments['bootstrap'];
- }
+ if (isset($arguments['test']) && $arguments['test'] !== FALSE) {
+ PHPUnit_TextUI_TestRunner::printVersionString();
- if ($option[0] == '--skeleton-class') {
- require_once 'PHPUnit/Util/Skeleton/Class.php';
+ if (isset($arguments['bootstrap'])) {
+ require_once $arguments['bootstrap'];
+ }
- $class = 'PHPUnit_Util_Skeleton_Class';
- } else {
- require_once 'PHPUnit/Util/Skeleton/Test.php';
+ if ($option[0] == '--skeleton-class') {
+ require_once 'PHPUnit/Util/Skeleton/Class.php';
- $class = 'PHPUnit_Util_Skeleton_Test';
- }
+ $class = 'PHPUnit_Util_Skeleton_Class';
+ } else {
+ require_once 'PHPUnit/Util/Skeleton/Test.php';
- if (isset($arguments['test']) && $arguments['test'] !== FALSE && isset($arguments['testFile'])) {
- PHPUnit_TextUI_TestRunner::printVersionString();
+ $class = 'PHPUnit_Util_Skeleton_Test';
+ }
try {
$skeleton = new $class($arguments['test'], $arguments['testFile']);

0 comments on commit 346b6be

Please sign in to comment.