public function handle(CreateRoomCommand $command) { $room = Room::create(new UUID($command->roomId()), $command->name(), $command->seatCapacity()); $this->repository->save($room, $command->aggregateVersion()); }
/** * @depends testBookSeat */ public function testOverbook(Room $room) { $this->setExpectedException('Exception'); $room->bookSeat(); $room->bookSeat(); }