Skip to content

Commit c3f16a5

Browse files
authored
Merge pull request #52945 from nextcloud/fix/cleanup-test-legacy-autoloader
2 parents 39c63df + 9560e00 commit c3f16a5

File tree

4 files changed

+0
-15
lines changed

4 files changed

+0
-15
lines changed

lib/autoloader.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,10 +95,6 @@ public function findClass(string $class): array {
9595
} catch (AppPathNotFoundException) {
9696
// App not found, ignore
9797
}
98-
} elseif ($class === 'Test\\TestCase') {
99-
// This File is considered public API, so we make sure that the class
100-
// can still be loaded, although the PSR-4 paths have not been loaded.
101-
$paths[] = \OC::$SERVERROOT . '/tests/lib/TestCase.php';
10298
}
10399
return $paths;
104100
}

lib/base.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -601,9 +601,6 @@ public static function init(): void {
601601
self::$loader = new \OC\Autoloader([
602602
OC::$SERVERROOT . '/lib/private/legacy',
603603
]);
604-
if (defined('PHPUNIT_RUN')) {
605-
self::$loader->addValidRoot(OC::$SERVERROOT . '/tests');
606-
}
607604
spl_autoload_register([self::$loader, 'load']);
608605
$loaderEnd = microtime(true);
609606

tests/lib/AutoLoaderTest.php

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,6 @@ public function testLegacyPath(): void {
2424
], $this->loader->findClass('OC_JSON'));
2525
}
2626

27-
public function testLoadTestTestCase(): void {
28-
$this->assertEquals([
29-
\OC::$SERVERROOT . '/tests/lib/TestCase.php'
30-
], $this->loader->findClass('Test\TestCase'));
31-
}
32-
3327
public function testLoadCore(): void {
3428
$this->assertEquals([
3529
\OC::$SERVERROOT . '/lib/private/legacy/foo/bar.php',

tests/lib/Files/Storage/Wrapper/QuotaTest.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@
1212
use OC\Files\Storage\Local;
1313
use OCP\Files;
1414

15-
\OC::$loader->load('\OC\Files\Filesystem');
16-
1715
/**
1816
* Class QuotaTest
1917
*

0 commit comments

Comments
 (0)