Pantheon\Terminus\UnitTests\Commands\Backup\GetCommandTest::testGetBackupWithFile PHP Method

testGetBackupWithFile() public method

Tests the backup:get command with file
    public function testGetBackupWithFile()
    {
        $test_filename = 'test.tar.gz';
        $test_download_url = 'http://download';
        $this->backups->expects($this->once())->method('getBackupByFileName')->with($test_filename)->willReturn($this->backup);
        $this->backup->expects($this->once())->method('getUrl')->willReturn($test_download_url);
        $output = $this->command->getBackup('mysite.dev', ['file' => $test_filename]);
        $this->assertEquals($output, $test_download_url);
    }