Skip to content

Commit

Permalink
Nette\Test: new option -s displays information about skipped tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kravco authored and dg committed Sep 9, 2012
1 parent 16d6fbf commit e512382
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions Tester/RunTests.php
Expand Up @@ -19,6 +19,7 @@
-c <path> Look for php.ini in directory <path> or use <path> as php.ini.
-d key=val Define INI entry 'key' with value 'val'.
-l <path> Specify path to shared library files (LD_LIBRARY_PATH)
-s Show information about skipped tests

<?php
}
Expand Down Expand Up @@ -67,6 +68,9 @@ class NetteTestRunner
/** @var string php-cgi environment variables */
public $phpEnvironment;

/** @var bool display skipped tests information? */
public $displaySkipped = FALSE;



/**
Expand Down Expand Up @@ -123,14 +127,13 @@ public function run()
$failedCount = count($failed);
$skippedCount = count($skipped);

/*
if ($skippedCount) {
if ($this->displaySkipped && $skippedCount) {
echo "\n\nSkipped:\n";
foreach ($skipped as $i => $item) {
list($name, $file) = $item;
echo "\n", ($i + 1), ") $name\n $file\n";
}
}*/
}

if (!$count) {
echo "No tests found\n";
Expand Down Expand Up @@ -204,6 +207,9 @@ public function parseArguments()
$args->next();
$this->phpEnvironment .= 'LD_LIBRARY_PATH='. escapeshellarg($args->current()) . ' ';
break;
case 's':
$this->displaySkipped = TRUE;
break;
default:
echo "Error: Unknown option -$arg[1]\n";
exit;
Expand Down

0 comments on commit e512382

Please sign in to comment.