mirror of
https://github.com/nextcloud/server.git
synced 2026-02-27 18:37:17 +01:00
chore: Remove useless legacy autoloader for tests
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
This commit is contained in:
committed by
Côme Chilliet
parent
39c63df1ea
commit
9560e00cf3
@@ -95,10 +95,6 @@ class Autoloader {
|
||||
} catch (AppPathNotFoundException) {
|
||||
// App not found, ignore
|
||||
}
|
||||
} elseif ($class === 'Test\\TestCase') {
|
||||
// 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';
|
||||
}
|
||||
return $paths;
|
||||
}
|
||||
|
||||
@@ -601,9 +601,6 @@ class OC {
|
||||
self::$loader = new \OC\Autoloader([
|
||||
OC::$SERVERROOT . '/lib/private/legacy',
|
||||
]);
|
||||
if (defined('PHPUNIT_RUN')) {
|
||||
self::$loader->addValidRoot(OC::$SERVERROOT . '/tests');
|
||||
}
|
||||
spl_autoload_register([self::$loader, 'load']);
|
||||
$loaderEnd = microtime(true);
|
||||
|
||||
|
||||
@@ -24,12 +24,6 @@ class AutoLoaderTest extends TestCase {
|
||||
], $this->loader->findClass('OC_JSON'));
|
||||
}
|
||||
|
||||
public function testLoadTestTestCase(): void {
|
||||
$this->assertEquals([
|
||||
\OC::$SERVERROOT . '/tests/lib/TestCase.php'
|
||||
], $this->loader->findClass('Test\TestCase'));
|
||||
}
|
||||
|
||||
public function testLoadCore(): void {
|
||||
$this->assertEquals([
|
||||
\OC::$SERVERROOT . '/lib/private/legacy/foo/bar.php',
|
||||
|
||||
@@ -12,8 +12,6 @@ use OC\Files\Cache\CacheEntry;
|
||||
use OC\Files\Storage\Local;
|
||||
use OCP\Files;
|
||||
|
||||
\OC::$loader->load('\OC\Files\Filesystem');
|
||||
|
||||
/**
|
||||
* Class QuotaTest
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user