From bc13ecd9918f11e74cf6c1dcfd7e5153618f9345 Mon Sep 17 00:00:00 2001 From: Git'Fellow <12234510+solracsf@users.noreply.github.com> Date: Thu, 10 Sep 2026 12:05:49 +0200 Subject: [PATCH] test(files_external): call parent::setUp() in BackendServiceTest BackendServiceTest overrode setUp() without calling the parent, but still ran TestCase::tearDown(). For a test outside the DB group that tearDown re-registers IDBConnection as TestCase::$realDatabase, which only the parent setUp() initialises. When BackendServiceTest was the first non-DB test in a run, $realDatabase stayed null and every later test in the process got a null database connection. This showed up when running apps/files_external/tests/Service on its own: 112 of 138 tests errored with "IDBConnection, null given". The full files_external suite hides it because earlier tests set $realDatabase first. Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com> --- apps/files_external/tests/Service/BackendServiceTest.php | 1 + 1 file changed, 1 insertion(+) diff --git a/apps/files_external/tests/Service/BackendServiceTest.php b/apps/files_external/tests/Service/BackendServiceTest.php index 7e00d0eab445f..b9c2b6defeb6a 100644 --- a/apps/files_external/tests/Service/BackendServiceTest.php +++ b/apps/files_external/tests/Service/BackendServiceTest.php @@ -23,6 +23,7 @@ class BackendServiceTest extends \Test\TestCase { protected LoggerInterface&MockObject $logger; protected function setUp(): void { + parent::setUp(); $this->appConfig = $this->createMock(IAppConfig::class); $this->logger = $this->createMock(LoggerInterface::class); }