Conditions | 1 |
Total Lines | 14 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
21 | public function testSpecificPresentationModelsShouldOnlySetDefinedVariables(): void |
||
22 | { |
||
23 | $presentationModel = new class ([ |
||
24 | 'name' => 'name', |
||
25 | 'non_existing_variable' => 'non_existing_variable', |
||
26 | ]) extends PresentationModel |
||
27 | { |
||
28 | protected $name = ''; |
||
29 | }; |
||
30 | |||
31 | $variables = $presentationModel->getVariables(); |
||
32 | |||
33 | $this->assertArrayHasKey('name', $variables); |
||
34 | $this->assertArrayNotHasKey('non_existing_variable', $variables); |
||
35 | } |
||
53 |