Permalink
Browse files

Mv startup test files.

  • Loading branch information...
1 parent 7c649a8 commit d14aef368b635d4c122194aa8ece459ec7110c87 @cdujeu cdujeu committed May 10, 2016
Showing with 207 additions and 206 deletions.
  1. +6 −3 core/src/core/src/pydio/Core/Utils/Utils.php
  2. 0 core/src/core/{tests/test.AJXPVersion.php → src/pydio/Tests/AJXPVersion.php}
  3. +1 −3 core/src/core/src/pydio/Tests/AbstractTest.php
  4. 0 core/src/core/{tests/test.Client.php → src/pydio/Tests/Client.php}
  5. 0 core/src/core/{tests/test.PHPCLI.php → src/pydio/Tests/PHPCLI.php}
  6. 0 core/src/core/{tests/test.PHPDomXML.php → src/pydio/Tests/PHPDomXML.php}
  7. 0 core/src/core/{tests/test.PHPErrorLevel.php → src/pydio/Tests/PHPErrorLevel.php}
  8. 0 core/src/core/{tests/test.PHPExif.php → src/pydio/Tests/PHPExif.php}
  9. 0 core/src/core/{tests/test.PHPGDVersion.php → src/pydio/Tests/PHPGDVersion.php}
  10. 0 core/src/core/{tests/test.PHPLimits.php → src/pydio/Tests/PHPLimits.php}
  11. 0 core/src/core/{tests/test.PHPMCrypt.php → src/pydio/Tests/PHPMCrypt.php}
  12. 0 core/src/core/{tests/test.PHPOS.php → src/pydio/Tests/PHPOS.php}
  13. 0 core/src/core/{tests/test.PHPSession.php → src/pydio/Tests/PHPSession.php}
  14. 0 core/src/core/{tests/test.PHPVersion.php → src/pydio/Tests/PHPVersion.php}
  15. 0 core/src/core/{tests/test.PHP_APC.php → src/pydio/Tests/PHP_APC.php}
  16. 0 core/src/core/{tests/test.PHP_OB.php → src/pydio/Tests/PHP_OB.php}
  17. 0 core/src/core/{tests/test.PHP_file_uploads.php → src/pydio/Tests/PHP_file_uploads.php}
  18. 0 core/src/core/{tests/test.PHP_magic_quotes.php → src/pydio/Tests/PHP_magic_quotes.php}
  19. 0 core/src/core/{tests/test.SSLEncryption.php → src/pydio/Tests/SSLEncryption.php}
  20. 0 core/src/core/{tests/test.ServerEncoding.php → src/pydio/Tests/ServerEncoding.php}
  21. 0 core/src/core/{tests/test.Upload.php → src/pydio/Tests/Upload.php}
  22. 0 core/src/core/{tests/test.UsersConfig.php → src/pydio/Tests/UsersConfig.php}
  23. 0 core/src/core/{tests/test.Writeability.php → src/pydio/Tests/Writeability.php}
  24. 0 core/src/core/{tests/test.Zlib.php → src/pydio/Tests/Zlib.php}
  25. 0 core/src/core/{tests → src/pydio/Tests}/api_test.phtml
  26. +200 −200 core/src/core/{tests → src/pydio/Tests}/startup.phtml
  27. 0 core/src/core/tests/index.html
@@ -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');
@@ -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");
}
/**
@@ -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;
@@ -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") {
@@ -20,8 +20,6 @@
*/
namespace Pydio\Tests;
-use Pydio\Access\Core\Model\Repository;
-
defined('AJXP_EXEC') or die( 'Access not allowed');
global $MAIN_testsArray;
@@ -33,7 +31,7 @@
* @package Pydio
* @subpackage Core
*/
-class AbstractTest
+abstract class AbstractTest
{
/** The test name */
public $name;
Oops, something went wrong.

0 comments on commit d14aef3

Please sign in to comment.