diff --git a/core-bundle/tests/Contao/DC_TableTest.php b/core-bundle/tests/Contao/DC_TableTest.php index c91f9669a26..9857494cd8d 100644 --- a/core-bundle/tests/Contao/DC_TableTest.php +++ b/core-bundle/tests/Contao/DC_TableTest.php @@ -45,8 +45,12 @@ public function testGetPalette(array $dca, array $row, string $expected): void ->willReturn($statement) ; - $dataContainer = (new \ReflectionClass(DC_Table::class))->newInstanceWithoutConstructor(); - $dataContainer->Database = $database; + $reflection = new \ReflectionClass(DC_Table::class); + $dataContainer = $reflection->newInstanceWithoutConstructor(); + + $method = $reflection->getMethod('import'); + $method->setAccessible(true); + $method->invoke($dataContainer, $database, 'Database'); /** @phpstan-ignore-next-line */ $dataContainer->strTable = 'tl_test';