| Conditions | 1 |
| Total Lines | 14 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 27 | public function testSpecificPresentationModelsShouldOnlySetDefinedVariables() |
||
| 28 | { |
||
| 29 | $presentationModel = new class ([ |
||
| 30 | 'name' => 'name', |
||
| 31 | 'non_existing_variable' => 'non_existing_variable', |
||
| 32 | ]) extends PresentationModel |
||
| 33 | { |
||
| 34 | protected $name = ''; |
||
| 35 | }; |
||
| 36 | |||
| 37 | $variables = $presentationModel->getVariables(); |
||
| 38 | |||
| 39 | $this->assertArrayHasKey('name', $variables); |
||
| 40 | $this->assertArrayNotHasKey('non_existing_variable', $variables); |
||
| 41 | } |
||
| 65 |