]> khamidou — GitHub mirrors - arcanist.git/commitdiff
Allow running phpunit tests from any directory
authorvissi <vissi@vissi.su>
Thu, 19 Jul 2012 22:00:14 +0000 (15:00 -0700)
committerepriestley <git@epriestley.com>
Thu, 19 Jul 2012 22:00:56 +0000 (15:00 -0700)
Test Plan: Run `arc unit` anywhere.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, epriestley
Differential Revision: https://secure.phabricator.com/D3017

src/unit/engine/PhpunitTestEngine.php

index 221e8821d3658a0bf7f2ca473bd244e8383b3705..baa7a201b2efe9a52e5f3a7bf48655e1c7282007 100644 (file)
@@ -36,11 +36,10 @@ final class PhpunitTestEngine extends ArcanistBaseUnitTestEngine {
   public function run() {
 
     $this->projectRoot = $this->getWorkingCopy()->getProjectRoot();
-
     $this->affectedTests = array();
     foreach ($this->getPaths() as $path) {
 
-      $path = Filesystem::resolvePath($path);
+      $path = Filesystem::resolvePath($path, $this->projectRoot);
 
       // TODO: add support for directories
       // Users can call phpunit on the directory themselves