Browse Source

Suppress TLS error from mock server

tags/0.8.0
J. King 8 months ago
parent
commit
f4d4feb69c
1 changed files with 6 additions and 1 deletions
  1. 6
    1
      RoboFile.php

+ 6
- 1
RoboFile.php View File

@@ -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();
}


Loading…
Cancel
Save