Skip to content
This repository has been archived by the owner on Nov 25, 2020. It is now read-only.

Commit

Permalink
Mv startup test files.
Browse files Browse the repository at this point in the history
  • Loading branch information
cdujeu committed May 10, 2016
1 parent 7c649a8 commit d14aef3
Show file tree
Hide file tree
Showing 27 changed files with 207 additions and 206 deletions.
9 changes: 6 additions & 3 deletions core/src/core/src/pydio/Core/Utils/Utils.php
Expand Up @@ -27,6 +27,7 @@
use Pydio\Core\PluginFramework\Plugin;
use Pydio\Core\PluginFramework\PluginsService;
use Pydio\Log\Core\AJXP_Logger;
use Pydio\Tests\AbstractTest;

defined('AJXP_EXEC') or die('Access not allowed');

Expand Down Expand Up @@ -1270,7 +1271,7 @@ public static function testResultsToTable($outputArray, $testedParams, $showSkip
$ALL_ROWS[$result][$item["name"]] = $item["info"];
}

include(AJXP_INSTALL_PATH."/core/tests/startup.phtml");
include(AJXP_TESTS_FOLDER . "/startup.phtml");
}

/**
Expand All @@ -1291,9 +1292,10 @@ public static function runTests(&$outputArray, &$testedParams)
foreach ($files as $file) {
require_once($file);
// Then create the test class
$testName = "Pydio\\Tests\\".str_replace(".php", "", substr($file, 5));
if(!class_exists($testName)) continue;
$testName = "Pydio\\Tests\\".str_replace(".php", "", $file);
if(!class_exists($testName) || $testName == "Pydio\\Tests\\AbstractTest") continue;
$class = new $testName();
if(!($class instanceof AbstractTest)) continue;

$result = $class->doTest();
if (!$result && $class->failedLevel != "info") $passed = false;
Expand Down Expand Up @@ -1333,6 +1335,7 @@ public static function runTests(&$outputArray, &$testedParams)
$class = new $testName();
foreach ($repoList as $repository) {
if($repository->isTemplate || $repository->getParentId() != null) continue;
if(!($class instanceof AbstractTest)) continue;
$result = $class->doRepositoryTest($repository);
if ($result === false || $result === true) {
if (!$result && $class->failedLevel != "info") {
Expand Down
4 changes: 1 addition & 3 deletions core/src/core/src/pydio/Tests/AbstractTest.php
Expand Up @@ -20,8 +20,6 @@
*/
namespace Pydio\Tests;

use Pydio\Access\Core\Model\Repository;

defined('AJXP_EXEC') or die( 'Access not allowed');

global $MAIN_testsArray;
Expand All @@ -33,7 +31,7 @@
* @package Pydio
* @subpackage Core
*/
class AbstractTest
abstract class AbstractTest
{
/** The test name */
public $name;
Expand Down
File renamed without changes.

0 comments on commit d14aef3

Please sign in to comment.