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);
}