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