Fix tests
parent
67261e8d47
commit
46dde9453b
|
@ -469,8 +469,8 @@ class FileDownloaderTest extends TestCase
|
||||||
$path = $this->getUniqueTmpDirectory();
|
$path = $this->getUniqueTmpDirectory();
|
||||||
$filesystem = $this->getMockBuilder('Composer\Util\Filesystem')->getMock();
|
$filesystem = $this->getMockBuilder('Composer\Util\Filesystem')->getMock();
|
||||||
$filesystem->expects($this->once())
|
$filesystem->expects($this->once())
|
||||||
->method('removeDirectory')
|
->method('removeDirectoryAsync')
|
||||||
->will($this->returnValue(true));
|
->will($this->returnValue(\React\Promise\resolve(true)));
|
||||||
|
|
||||||
$downloader = $this->getDownloader($ioMock, null, null, null, null, $filesystem);
|
$downloader = $this->getDownloader($ioMock, null, null, null, null, $filesystem);
|
||||||
|
|
||||||
|
|
|
@ -156,9 +156,9 @@ class FossilDownloaderTest extends TestCase
|
||||||
->with($this->equalTo($expectedResetCommand));
|
->with($this->equalTo($expectedResetCommand));
|
||||||
$filesystem = $this->getMockBuilder('Composer\Util\Filesystem')->getMock();
|
$filesystem = $this->getMockBuilder('Composer\Util\Filesystem')->getMock();
|
||||||
$filesystem->expects($this->once())
|
$filesystem->expects($this->once())
|
||||||
->method('removeDirectory')
|
->method('removeDirectoryAsync')
|
||||||
->with($this->equalTo('composerPath'))
|
->with($this->equalTo('composerPath'))
|
||||||
->will($this->returnValue(true));
|
->will($this->returnValue(\React\Promise\resolve(true)));
|
||||||
|
|
||||||
$downloader = $this->getDownloaderMock(null, null, $processExecutor, $filesystem);
|
$downloader = $this->getDownloaderMock(null, null, $processExecutor, $filesystem);
|
||||||
$downloader->remove($packageMock, 'composerPath');
|
$downloader->remove($packageMock, 'composerPath');
|
||||||
|
|
|
@ -661,9 +661,9 @@ composer https://github.com/old/url (push)
|
||||||
->will($this->returnValue(0));
|
->will($this->returnValue(0));
|
||||||
$filesystem = $this->getMockBuilder('Composer\Util\Filesystem')->getMock();
|
$filesystem = $this->getMockBuilder('Composer\Util\Filesystem')->getMock();
|
||||||
$filesystem->expects($this->once())
|
$filesystem->expects($this->once())
|
||||||
->method('removeDirectory')
|
->method('removeDirectoryAsync')
|
||||||
->with($this->equalTo('composerPath'))
|
->with($this->equalTo('composerPath'))
|
||||||
->will($this->returnValue(true));
|
->will($this->returnValue(\React\Promise\resolve(true)));
|
||||||
|
|
||||||
$downloader = $this->getDownloaderMock(null, null, $processExecutor, $filesystem);
|
$downloader = $this->getDownloaderMock(null, null, $processExecutor, $filesystem);
|
||||||
$downloader->prepare('uninstall', $packageMock, 'composerPath');
|
$downloader->prepare('uninstall', $packageMock, 'composerPath');
|
||||||
|
|
|
@ -145,9 +145,9 @@ class HgDownloaderTest extends TestCase
|
||||||
->with($this->equalTo($expectedResetCommand));
|
->with($this->equalTo($expectedResetCommand));
|
||||||
$filesystem = $this->getMockBuilder('Composer\Util\Filesystem')->getMock();
|
$filesystem = $this->getMockBuilder('Composer\Util\Filesystem')->getMock();
|
||||||
$filesystem->expects($this->once())
|
$filesystem->expects($this->once())
|
||||||
->method('removeDirectory')
|
->method('removeDirectoryAsync')
|
||||||
->with($this->equalTo('composerPath'))
|
->with($this->equalTo('composerPath'))
|
||||||
->will($this->returnValue(true));
|
->will($this->returnValue(\React\Promise\resolve(true)));
|
||||||
|
|
||||||
$downloader = $this->getDownloaderMock(null, null, $processExecutor, $filesystem);
|
$downloader = $this->getDownloaderMock(null, null, $processExecutor, $filesystem);
|
||||||
$downloader->prepare('uninstall', $packageMock, 'composerPath');
|
$downloader->prepare('uninstall', $packageMock, 'composerPath');
|
||||||
|
|
Loading…
Reference in New Issue