Skip to content

Commit

Permalink
Complete acceptance-testrunner
Browse files Browse the repository at this point in the history
  • Loading branch information
g105b committed Jan 21, 2015
1 parent d367d8d commit d8852e0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/Cli/TestRunner.php
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ private function testAcceptance() {
$result = 0;
$baseCwd = getcwd();
$gtroot = Path::get(Path::GTROOT);
$root = Path::get(Path::ROOT);
$testPath = Path::fixCase($this->approot . "/test/Acceptance");

if(!is_dir($testPath)) {
Expand All @@ -128,7 +129,8 @@ private function testAcceptance() {
mkdir($testWebroot, 0775, true);
}

$serverCommand = "$gtroot/bin/serve --approot=$testPath --port=8089";

$serverCommand = "$gtroot/bin/serve --approot=$root --port=8089";
$server = proc_open($serverCommand, $this->descriptorSpec, $pipes);

chdir($testPath);
Expand Down
7 changes: 6 additions & 1 deletion src/Core/Path.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,12 @@ public static function get($name) {
break;

case self::ROOT:
$p = dirname($_SERVER["DOCUMENT_ROOT"]);
if(empty($_SERVER["DOCUMENT_ROOT"])) {
$p = getcwd();
}
else {
$p = dirname($_SERVER["DOCUMENT_ROOT"]);
}
break;

case self::SCRIPT:
Expand Down

0 comments on commit d8852e0

Please sign in to comment.