Skip to content

Commit

Permalink
Update tests (100% code cov)
Browse files Browse the repository at this point in the history
  • Loading branch information
zoglo committed Dec 28, 2023
1 parent e14b1a5 commit 512223d
Showing 1 changed file with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,20 @@ protected function tearDown(): void
parent::tearDown();
}

public function testTableIsNotSet(): void
{
$GLOBALS['TL_DCA'] = [
'tl_foo' => [],
'tl_bar' => [],
];

// Test will fail if tl_module is set due to palettes not existing
$listener = new CommentsConditionalFieldsListener(['ContaoNewsBundle' => ContaoNewsBundle::class]);
$listener('tl_module');

$this->assertArrayNotHasKey('tl_module', $GLOBALS['TL_DCA']);
}

public function testAppliesModuleFields(): void
{
$palettes = '{foo_legend},bar;{protected_legend},baz';
Expand Down

0 comments on commit 512223d

Please sign in to comment.