2019-11-27 23:43:21 +01:00
|
|
|
<?php
|
|
|
|
|
2023-02-03 20:41:59 +01:00
|
|
|
declare(strict_types=1);
|
|
|
|
|
2019-11-27 23:43:21 +01:00
|
|
|
namespace Engelsystem\Test\Unit\Helpers\Schedule;
|
|
|
|
|
|
|
|
use Engelsystem\Helpers\Schedule\Event;
|
|
|
|
use Engelsystem\Helpers\Schedule\Room;
|
2021-12-28 14:43:23 +01:00
|
|
|
use Engelsystem\Helpers\Uuid;
|
2019-11-27 23:43:21 +01:00
|
|
|
use Engelsystem\Test\Unit\TestCase;
|
|
|
|
|
|
|
|
class RoomTest extends TestCase
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* @covers \Engelsystem\Helpers\Schedule\Room::__construct
|
|
|
|
* @covers \Engelsystem\Helpers\Schedule\Room::getName
|
2021-12-28 14:43:23 +01:00
|
|
|
* @covers \Engelsystem\Helpers\Schedule\Room::getEvents
|
|
|
|
* @covers \Engelsystem\Helpers\Schedule\Room::setEvents
|
2019-11-27 23:43:21 +01:00
|
|
|
*/
|
2022-12-14 19:15:20 +01:00
|
|
|
public function testCreate(): void
|
2019-11-27 23:43:21 +01:00
|
|
|
{
|
|
|
|
$room = new Room('Test');
|
|
|
|
$this->assertEquals('Test', $room->getName());
|
2021-12-28 14:43:23 +01:00
|
|
|
$this->assertEquals([], $room->getEvents());
|
2019-11-27 23:43:21 +01:00
|
|
|
|
|
|
|
$events = [$this->createMock(Event::class), $this->createMock(Event::class)];
|
|
|
|
$events2 = [$this->createMock(Event::class)];
|
|
|
|
$room = new Room('Test2', $events);
|
2021-12-28 14:43:23 +01:00
|
|
|
$this->assertEquals($events, $room->getEvents());
|
2019-11-27 23:43:21 +01:00
|
|
|
|
2021-12-28 14:43:23 +01:00
|
|
|
$room->setEvents($events2);
|
|
|
|
$this->assertEquals($events2, $room->getEvents());
|
2019-11-27 23:43:21 +01:00
|
|
|
}
|
|
|
|
}
|