Hirak\Prestissimo\PrefetcherTest::testFetchAllWithInstallButFileExists PHP Method

testFetchAllWithInstallButFileExists() public method

    public function testFetchAllWithInstallButFileExists()
    {
        list($opp, $pp) = $this->createProphecies();
        $pp->getName()->willReturn('');
        $pp->getDistType()->willReturn('html');
        $pp->getDistUrl()->willReturn('http://example.com/');
        $pp->getDistMirrors()->willReturn(array());
        $pp->getSourceUrl()->willReturn('git://uso800');
        $path = sys_get_temp_dir() . DIRECTORY_SEPARATOR . FileDownloaderDummy::getCacheKeyCompat($pp->reveal(), 'http://example.com/');
        $fp = fopen($path, 'wb');
        $opp->getPackage()->willReturn($pp->reveal())->shouldBeCalled();
        $fetcher = new Prefetcher();
        $fetcher->fetchAllFromOperations($this->iop->reveal(), $this->configp->reveal(), array($opp->reveal()));
        fclose($fp);
        unlink($path);
    }