diff options
author | Côme Chilliet <come.chilliet@nextcloud.com> | 2025-05-19 09:50:54 +0200 |
---|---|---|
committer | Côme Chilliet <91878298+come-nc@users.noreply.github.com> | 2025-05-27 16:15:58 +0200 |
commit | 9560e00cf3e5eaec2f047183165fb89ecdd2f630 (patch) | |
tree | 2441981a878f2f5e6a4fdd8e1eda9eb9c26c2c23 | |
parent | 39c63df1ea3449f0df4b1af35ca98e895fddd809 (diff) | |
download | nextcloud-server-fix/cleanup-test-legacy-autoloader.tar.gz nextcloud-server-fix/cleanup-test-legacy-autoloader.zip |
chore: Remove useless legacy autoloader for testsfix/cleanup-test-legacy-autoloader
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
-rw-r--r-- | lib/autoloader.php | 4 | ||||
-rw-r--r-- | lib/base.php | 3 | ||||
-rw-r--r-- | tests/lib/AutoLoaderTest.php | 6 | ||||
-rw-r--r-- | tests/lib/Files/Storage/Wrapper/QuotaTest.php | 2 |
4 files changed, 0 insertions, 15 deletions
diff --git a/lib/autoloader.php b/lib/autoloader.php index 7084eb93c89..2a95f5944a3 100644 --- a/lib/autoloader.php +++ b/lib/autoloader.php @@ -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; } diff --git a/lib/base.php b/lib/base.php index 639568cf640..75f5cfee3e8 100644 --- a/lib/base.php +++ b/lib/base.php @@ -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); diff --git a/tests/lib/AutoLoaderTest.php b/tests/lib/AutoLoaderTest.php index 72d4a2e94cf..9fef8f5280d 100644 --- a/tests/lib/AutoLoaderTest.php +++ b/tests/lib/AutoLoaderTest.php @@ -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', diff --git a/tests/lib/Files/Storage/Wrapper/QuotaTest.php b/tests/lib/Files/Storage/Wrapper/QuotaTest.php index 791e8047f7f..3115f1288a0 100644 --- a/tests/lib/Files/Storage/Wrapper/QuotaTest.php +++ b/tests/lib/Files/Storage/Wrapper/QuotaTest.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 * |