Merge pull request #52945 from nextcloud/fix/cleanup-test-legacy-autoloader

pull/52949/head
John Molakvoæ 2025-05-27 17:57:03 +07:00 committed by GitHub
commit c3f16a554e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
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
*