assertEquals('Test', $room->getName()); $this->assertEquals([], $room->getEvents()); $events = [$this->createMock(Event::class), $this->createMock(Event::class)]; $events2 = [$this->createMock(Event::class)]; $room = new Room('Test2', $events); $this->assertEquals($events, $room->getEvents()); $room->setEvents($events2); $this->assertEquals($events2, $room->getEvents()); } }