diff options
| author | Jan-Hendrik Willms <tleilax+github@gmail.com> | 2022-07-15 11:46:38 +0200 |
|---|---|---|
| committer | Jan-Hendrik Willms <tleilax+github@gmail.com> | 2022-07-15 11:46:38 +0200 |
| commit | ca93122050607f51afd4d571680bd2b4d0fdab10 (patch) | |
| tree | 6ac68c9f36f6a6f796602d469bf3e3b676784317 /tests | |
| parent | 2b21164387aa3f8ad97eb9d8b1f272089483a6d1 (diff) | |
fix bad assignments on previously undeclared arrays in StudipController, re #1328
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/unit/lib/classes/StudipControllerTest.php | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/unit/lib/classes/StudipControllerTest.php b/tests/unit/lib/classes/StudipControllerTest.php index 0eea671..f74eae4 100644 --- a/tests/unit/lib/classes/StudipControllerTest.php +++ b/tests/unit/lib/classes/StudipControllerTest.php @@ -200,6 +200,9 @@ final class StudipControllerTest extends Codeception\Test\Unit $controller->baz[] = 23; $this->assertEquals([23], $controller->baz); + $controller->bad[] = 23; + $this->assertEquals([23], $controller->bad); + // Test fetching all variables $variables = $controller->get_assigned_variables(); @@ -219,6 +222,10 @@ final class StudipControllerTest extends Codeception\Test\Unit $this->assertArrayHasKey('baz', $variables); $this->assertCount(1, $variables['baz']); $this->assertEquals([23], $variables['baz']); + + $this->assertArrayHasKey('bad', $variables); + $this->assertCount(1, $variables['bad']); + $this->assertEquals([23], $variables['bad']); } /** |
