diff options
Diffstat (limited to 'tests/functional/lib/models')
5 files changed, 8 insertions, 8 deletions
diff --git a/tests/functional/lib/models/resources/BuildingTest.php b/tests/functional/lib/models/resources/BuildingTest.php index 6576196..17c58a4 100644 --- a/tests/functional/lib/models/resources/BuildingTest.php +++ b/tests/functional/lib/models/resources/BuildingTest.php @@ -49,7 +49,7 @@ class BuildingTest extends \Codeception\Test\Unit \DBManager::getInstance()->setConnection('studip', $this->db_handle); // Workaround old-style Stud.IP-API using $GLOBALS['user'] - $this->oldUser = $GLOBALS['user']; + $this->oldUser = $GLOBALS['user'] ?? null; $GLOBALS['user'] = new \Seminar_User( \User::findByUsername('root@studip') ); diff --git a/tests/functional/lib/models/resources/LocationTest.php b/tests/functional/lib/models/resources/LocationTest.php index a8c4261..f283cab 100644 --- a/tests/functional/lib/models/resources/LocationTest.php +++ b/tests/functional/lib/models/resources/LocationTest.php @@ -50,7 +50,7 @@ class LocationTest extends \Codeception\Test\Unit \DBManager::getInstance()->setConnection('studip', $this->db_handle); // Workaround old-style Stud.IP-API using $GLOBALS['user'] - $this->oldUser = $GLOBALS['user']; + $this->oldUser = $GLOBALS['user'] ?? null; $GLOBALS['user'] = new \Seminar_User( \User::findByUsername('root@studip') ); diff --git a/tests/functional/lib/models/resources/ResourceAssignmentTest.php b/tests/functional/lib/models/resources/ResourceAssignmentTest.php index f2c2fcd..87fbde7 100644 --- a/tests/functional/lib/models/resources/ResourceAssignmentTest.php +++ b/tests/functional/lib/models/resources/ResourceAssignmentTest.php @@ -52,11 +52,11 @@ class ResourceAssignmentTest extends \Codeception\Test\Unit \Config::get()->setValue('LOG_ENABLE', false); // Workaround old-style Stud.IP-API using $GLOBALS['user'] - $this->oldUser = $GLOBALS['user']; + $this->oldUser = $GLOBALS['user'] ?? null; $GLOBALS['user'] = new \Seminar_User( \User::findByUsername('root@studip') ); - $this->oldPerm = $GLOBALS['perm']; + $this->oldPerm = $GLOBALS['perm'] ?? null; $GLOBALS['perm'] = new \Seminar_Perm(); //As a final step we create the SORM objects for our test cases: diff --git a/tests/functional/lib/models/resources/ResourceTest.php b/tests/functional/lib/models/resources/ResourceTest.php index 75a082a..96003d7 100644 --- a/tests/functional/lib/models/resources/ResourceTest.php +++ b/tests/functional/lib/models/resources/ResourceTest.php @@ -46,11 +46,11 @@ class ResourceTest extends \Codeception\Test\Unit \DBManager::getInstance()->setConnection('studip', $this->db_handle); // Workaround old-style Stud.IP-API using $GLOBALS['user'] - $this->oldUser = $GLOBALS['user']; + $this->oldUser = $GLOBALS['user'] ?? null; $GLOBALS['user'] = new \Seminar_User( \User::findByUsername('root@studip') ); - $this->oldPerm = $GLOBALS['perm']; + $this->oldPerm = $GLOBALS['perm'] ?? null; $GLOBALS['perm'] = new \Seminar_Perm(); //As a final step we create the SORM objects for our test cases: diff --git a/tests/functional/lib/models/resources/RoomTest.php b/tests/functional/lib/models/resources/RoomTest.php index 82611f2..8dd30a4 100644 --- a/tests/functional/lib/models/resources/RoomTest.php +++ b/tests/functional/lib/models/resources/RoomTest.php @@ -61,11 +61,11 @@ class RoomTest extends \Codeception\Test\Unit \DBManager::getInstance()->setConnection('studip', $this->db_handle); // Workaround old-style Stud.IP-API using $GLOBALS['user'] - $this->oldUser = $GLOBALS['user']; + $this->oldUser = $GLOBALS['user'] ?? null; $GLOBALS['user'] = new \Seminar_User( \User::findByUsername('root@studip') ); - $this->oldPerm = $GLOBALS['perm']; + $this->oldPerm = $GLOBALS['perm'] ?? null; $GLOBALS['perm'] = new \Seminar_Perm(); //As a final step we create the SORM objects for our test cases: |
