chore: Remove useless legacy autoloader for tests

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
pull/52945/head
Côme Chilliet 2025-05-19 09:50:54 +07:00 committed by Côme Chilliet
parent 39c63df1ea
commit 9560e00cf3
4 changed files with 0 additions and 15 deletions

@ -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
*