Fix tests

main
Jordi Boggiano 3 years ago
parent 67261e8d47
commit 46dde9453b
No known key found for this signature in database
GPG Key ID: 7BBD42C429EC80BC

@ -469,8 +469,8 @@ class FileDownloaderTest extends TestCase
$path = $this->getUniqueTmpDirectory();
$filesystem = $this->getMockBuilder('Composer\Util\Filesystem')->getMock();
$filesystem->expects($this->once())
->method('removeDirectory')
->will($this->returnValue(true));
->method('removeDirectoryAsync')
->will($this->returnValue(\React\Promise\resolve(true)));
$downloader = $this->getDownloader($ioMock, null, null, null, null, $filesystem);

@ -156,9 +156,9 @@ class FossilDownloaderTest extends TestCase
->with($this->equalTo($expectedResetCommand));
$filesystem = $this->getMockBuilder('Composer\Util\Filesystem')->getMock();
$filesystem->expects($this->once())
->method('removeDirectory')
->method('removeDirectoryAsync')
->with($this->equalTo('composerPath'))
->will($this->returnValue(true));
->will($this->returnValue(\React\Promise\resolve(true)));
$downloader = $this->getDownloaderMock(null, null, $processExecutor, $filesystem);
$downloader->remove($packageMock, 'composerPath');

@ -661,9 +661,9 @@ composer https://github.com/old/url (push)
->will($this->returnValue(0));
$filesystem = $this->getMockBuilder('Composer\Util\Filesystem')->getMock();
$filesystem->expects($this->once())
->method('removeDirectory')
->method('removeDirectoryAsync')
->with($this->equalTo('composerPath'))
->will($this->returnValue(true));
->will($this->returnValue(\React\Promise\resolve(true)));
$downloader = $this->getDownloaderMock(null, null, $processExecutor, $filesystem);
$downloader->prepare('uninstall', $packageMock, 'composerPath');

@ -145,9 +145,9 @@ class HgDownloaderTest extends TestCase
->with($this->equalTo($expectedResetCommand));
$filesystem = $this->getMockBuilder('Composer\Util\Filesystem')->getMock();
$filesystem->expects($this->once())
->method('removeDirectory')
->method('removeDirectoryAsync')
->with($this->equalTo('composerPath'))
->will($this->returnValue(true));
->will($this->returnValue(\React\Promise\resolve(true)));
$downloader = $this->getDownloaderMock(null, null, $processExecutor, $filesystem);
$downloader->prepare('uninstall', $packageMock, 'composerPath');

Loading…
Cancel
Save