jobList = $this->createMock(IJobList::class); $this->checkBackupsCodes = new CheckBackupCodes($this->jobList); } public function testGetName(): void { $this->assertSame('Add background job to check for backup codes', $this->checkBackupsCodes->getName()); } public function testRun(): void { $this->jobList->expects($this->once()) ->method('add') ->with( $this->equalTo(\OCA\TwoFactorBackupCodes\BackgroundJob\CheckBackupCodes::class) ); $this->checkBackupsCodes->run($this->createMock(IOutput::class)); } }