Commit 94ad54ec authored by Joas Schilling's avatar Joas Schilling Committed by Thomas Müller
Browse files

Move tests/ to PSR-4 (#24731)

* Move a-b to PSR-4

* Move c-d to PSR-4

* Move e+g to PSR-4

* Move h-l to PSR-4

* Move m-r to PSR-4

* Move s-u to PSR-4

* Move files/ to PSR-4

* Move remaining tests to PSR-4

* Remove Test\ from old autoloader
parent 2ef751b1
......@@ -117,8 +117,6 @@ class Autoloader {
// This File is considered public API, so we make sure that the class
// can still be loaded, although the PSR-4 paths have not been loaded.
$paths[] = \OC::$SERVERROOT . '/tests/lib/TestCase.php';
} elseif (strpos($class, 'Test\\') === 0) {
$paths[] = \OC::$SERVERROOT . '/tests/lib/' . strtolower(str_replace('\\', '/', substr($class, 5)) . '.php');
}
return $paths;
}
......
......@@ -10,7 +10,6 @@ require_once __DIR__ . '/../lib/base.php';
\OC::$composerAutoloader->addPsr4('Test\\', OC::$SERVERROOT . '/tests/lib/', true);
\OC::$composerAutoloader->addPsr4('Tests\\', OC::$SERVERROOT . '/tests/', true);
\OC::$loader->addValidRoot(OC::$SERVERROOT . '/tests');
// load all enabled apps
\OC_App::loadApps();
......
......@@ -19,13 +19,14 @@
*
*/
namespace OC\App\CodeChecker;
namespace Test\App\CodeChecker;
use OC\App\CodeChecker\InfoChecker;
use OC\App\InfoParser;
use Test\TestCase;
class InfoCheckerTest extends TestCase {
/** @var InfoChecker */
/** @var InfoChecker */
protected $infoChecker;
public static function setUpBeforeClass() {
......
......@@ -6,7 +6,7 @@
* See the COPYING-README file.
*/
namespace Test\AppCodeChecker;
namespace Test\App\CodeChecker;
use OC\App\CodeChecker\CodeChecker;
use OC\App\CodeChecker\EmptyCheck;
......
......@@ -14,7 +14,7 @@ use OC\App\Platform;
use OCP\IL10N;
use Test\TestCase;
class DependencyAnalyzer extends TestCase {
class DependencyAnalyzerTest extends TestCase {
/** @var Platform */
private $platformMock;
......
......@@ -13,7 +13,7 @@ use OC;
use OCP\IURLGenerator;
use Test\TestCase;
class InfoParser extends TestCase {
class InfoParserTest extends TestCase {
/** @var \OC\App\InfoParser */
private $parser;
......
......@@ -19,7 +19,7 @@ use Test\TestCase;
* @package Test\App
* @group DB
*/
class Manager extends TestCase {
class ManagerTest extends TestCase {
/**
* @return \OCP\IAppConfig | \PHPUnit_Framework_MockObject_MockObject
*/
......
......@@ -11,7 +11,7 @@ namespace Test\App;
use OC;
class PlatformRepository extends \Test\TestCase {
class PlatformRepositoryTest extends \Test\TestCase {
/**
* @dataProvider providesVersions
......
......@@ -10,13 +10,13 @@
namespace Test;
/**
* Class AppConfig
* Class AppConfigTest
*
* @group DB
*
* @package Test
*/
class AppConfig extends TestCase {
class AppConfigTest extends TestCase {
/** @var \OCP\IAppConfig */
protected $appConfig;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment