time = $this->createMock(ITimeFactory::class); $this->resourceManager = $this->createMock(IResourceManager::class); $this->roomManager = $this->createMock(IRoomManager::class); $this->backgroundJob = new UpdateCalendarResourcesRoomsBackgroundJob( $this->time, $this->resourceManager, $this->roomManager, ); } public function testRun(): void { $this->resourceManager->expects(self::once()) ->method('update'); $this->roomManager->expects(self::once()) ->method('update'); $this->backgroundJob->run([]); } }