Changeset View
Changeset View
Standalone View
Standalone View
src/tests/TestCaseMeetTrait.php
Show All 31 Lines | trait TestCaseMeetTrait | ||||
/** | /** | ||||
* Reset a room after tests | * Reset a room after tests | ||||
*/ | */ | ||||
public function resetTestRoom($room_name = 'john'): void | public function resetTestRoom($room_name = 'john'): void | ||||
{ | { | ||||
$this->clearMeetEntitlements(); | $this->clearMeetEntitlements(); | ||||
$room = Room::where('name', $room_name)->first(); | $room = Room::where('name', $room_name)->first(); | ||||
$room->setSettings(['password' => null, 'locked' => null]); | $room->setSettings(['password' => null, 'locked' => null, 'nomedia' => null]); | ||||
if ($room->session_id) { | if ($room->session_id) { | ||||
$room->session_id = null; | $room->session_id = null; | ||||
$room->save(); | $room->save(); | ||||
} | } | ||||
} | } | ||||
/** | /** | ||||
* Prepare a room for testing | * Prepare a room for testing | ||||
*/ | */ | ||||
public function setupTestRoom($room_name = 'john'): void | public function setupTestRoom($room_name = 'john'): void | ||||
{ | { | ||||
$this->resetTestRoom($room_name); | $this->resetTestRoom($room_name); | ||||
$this->assignMeetEntitlement('john@kolab.org'); | $this->assignMeetEntitlement('john@kolab.org'); | ||||
} | } | ||||
} | } |