Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ausi committed Sep 14, 2022
1 parent bfc4338 commit 3348d0a
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions core-bundle/tests/Contao/DC_TableTest.php
Expand Up @@ -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';
Expand Down

0 comments on commit 3348d0a

Please sign in to comment.