Permalink
Browse files

A small fix to make the unit tests work in all cases.

  • Loading branch information...
1 parent 4c1ab4b commit ac078e8209e1e062e6e50614e3125b1f47ff1756 @zyxist zyxist committed Jul 10, 2011
Showing with 6 additions and 1 deletion.
  1. +6 −1 src/Opl/Autoloader/PHARLoader.php
@@ -27,6 +27,11 @@ class PHARLoader
* @internal
*/
protected $classMap;
+ /**
+ * The path to the PHAR file (for testing purposes only.
+ * @var string
+ */
+ protected $path = __FILE__;
/**
* Creates the class map loader and loads the map into the memory.
@@ -68,7 +73,7 @@ public function loadClass($className)
{
return false;
}
- require('phar://'.__FILE__.'/'.$this->classMap[$className][1]);
+ require('phar://'.$this->path.'/'.$this->classMap[$className][1]);
return true;
} // end loadClass();
} // end PHARLoader;

0 comments on commit ac078e8

Please sign in to comment.