|
|
@ -98,6 +98,11 @@ class RoboFile extends \Robo\Tasks { |
|
|
|
return defined("PHP_WINDOWS_VERSION_MAJOR"); |
|
|
|
} |
|
|
|
|
|
|
|
protected function blackhole(bool $all = false): string { |
|
|
|
$hole = $this->isWindows() ? "nul" : "/dev/null"; |
|
|
|
return $all ? ">$hole 2>&1" : "2>$hole"; |
|
|
|
} |
|
|
|
|
|
|
|
protected function runTests(string $executor, string $set, array $args) : Result { |
|
|
|
switch ($set) { |
|
|
|
case "typical": |
|
|
@ -117,7 +122,7 @@ class RoboFile extends \Robo\Tasks { |
|
|
|
} |
|
|
|
$execpath = realpath(self::BASE."vendor-bin/phpunit/vendor/phpunit/phpunit/phpunit"); |
|
|
|
$confpath = realpath(self::BASE_TEST."phpunit.xml"); |
|
|
|
$this->taskServer(8000)->host("localhost")->dir(self::BASE_TEST."docroot")->rawArg("-n")->arg(self::BASE_TEST."server.php")->background()->run(); |
|
|
|
$this->taskServer(8000)->host("localhost")->dir(self::BASE_TEST."docroot")->rawArg("-n")->arg(self::BASE_TEST."server.php")->rawArg($this->blackhole())->background()->run(); |
|
|
|
return $this->taskExec($executor)->arg($execpath)->option("-c", $confpath)->args(array_merge($set, $args))->run(); |
|
|
|
} |
|
|
|
|
|
|
|