Permalink
Browse files

Fix Tests w/ namespaces

  • Loading branch information...
1 parent 539497b commit 0e664ce15c2f7c60ea029b9a0c3231e9c33a06cf @cdujeu cdujeu committed May 7, 2016
@@ -1285,7 +1285,7 @@ public static function runTests(&$outputArray, &$testedParams)
foreach ($files as $file) {
require_once($file);
// Then create the test class
- $testName = str_replace(".php", "", substr($file, 5));
+ $testName = "Pydio\\Tests\\".str_replace(".php", "", substr($file, 5));
if(!class_exists($testName)) continue;
$class = new $testName();
@@ -1323,7 +1323,7 @@ public static function runTests(&$outputArray, &$testedParams)
require_once($file);
// Then create the test class
list($accessFolder, $testFileName) = explode("/", $file);
- $testName = str_replace(".php", "", substr($testFileName, 5) . "Test");
+ $testName = "Pydio\\Tests\\".str_replace(".php", "", substr($testFileName, 5) . "Test");
$class = new $testName();
foreach ($repoList as $repository) {
if($repository->isTemplate || $repository->getParentId() != null) continue;
@@ -18,9 +18,11 @@
*
* The latest code can be found at <http://pyd.io/>.
*/
-defined('AJXP_EXEC') or die( 'Access not allowed');
+namespace Pydio\Tests;
+
+use Pydio\Access\Core\Repository;
-require_once(AJXP_BIN_FOLDER . '/class.AbstractTest.php');
+defined('AJXP_EXEC') or die( 'Access not allowed');
/**
* @package AjaXplorer_Plugins
@@ -18,9 +18,9 @@
*
* The latest code can be found at <http://pyd.io/>.
*/
-defined('AJXP_EXEC') or die( 'Access not allowed');
+namespace Pydio\Tests;
-require_once(AJXP_BIN_FOLDER . '/class.AbstractTest.php');
+defined('AJXP_EXEC') or die( 'Access not allowed');
/**
* @package AjaXplorer_Plugins

0 comments on commit 0e664ce

Please sign in to comment.