Pantheon\Terminus\UnitTests\Commands\Backup\RestoreCommandTest::testRestoreBackupWithElementSucceeds PHP Method

testRestoreBackupWithElementSucceeds() public method

Tests the backup:restore command with an element when the backup operation succeeds
    public function testRestoreBackupWithElementSucceeds()
    {
        $this->backups->expects($this->once())->method('getFinishedBackups')->with('database')->willReturn([$this->backup]);
        $this->backup->expects($this->once())->method('restore')->willReturn($this->workflow);
        $this->workflow->expects($this->once())->method('wait')->with();
        $this->workflow->expects($this->once())->method('isSuccessful')->with()->willReturn(true);
        $this->logger->expects($this->once())->method('log')->with($this->equalTo('notice'), $this->equalTo('Restored the backup to {env}.'), $this->equalTo(['env' => $this->environment->id]));
        $out = $this->command->restoreBackup('mysite.dev', ['element' => 'db']);
        $this->assertNull($out);
    }