Pantheon\Terminus\UnitTests\Commands\Backup\RestoreCommandTest::testRestoreBackupWithInvalidFile PHP Метод

testRestoreBackupWithInvalidFile() публичный Метод

Tests the backup:restore command with file that doesn't exist
    public function testRestoreBackupWithInvalidFile()
    {
        $bad_file_name = 'no-file.tar.gz';
        $this->backups->expects($this->once())->method('getBackupByFileName')->with($this->equalTo($bad_file_name))->will($this->throwException(new TerminusNotFoundException()));
        $this->setExpectedException(TerminusNotFoundException::class);
        $out = $this->command->restoreBackup('mysite.dev', ['file' => $bad_file_name]);
        $this->assertNull($out);
    }