summaryrefslogtreecommitdiff
path: root/tests/Unit/Helpers/Schedule/RoomTest.php
blob: 8b9b600a23d79634a81e5f9073f9b45977a7340f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<?php

namespace Engelsystem\Test\Unit\Helpers\Schedule;

use Engelsystem\Helpers\Schedule\Event;
use Engelsystem\Helpers\Schedule\Room;
use Engelsystem\Test\Unit\TestCase;

class RoomTest extends TestCase
{
    /**
     * @covers \Engelsystem\Helpers\Schedule\Room::__construct
     * @covers \Engelsystem\Helpers\Schedule\Room::getName
     * @covers \Engelsystem\Helpers\Schedule\Room::getEvent
     * @covers \Engelsystem\Helpers\Schedule\Room::setEvent
     */
    public function testCreate()
    {
        $room = new Room('Test');
        $this->assertEquals('Test', $room->getName());
        $this->assertEquals([], $room->getEvent());

        $events = [$this->createMock(Event::class), $this->createMock(Event::class)];
        $events2 = [$this->createMock(Event::class)];
        $room = new Room('Test2', $events);
        $this->assertEquals($events, $room->getEvent());

        $room->setEvent($events2);
        $this->assertEquals($events2, $room->getEvent());
    }
}