1
0
Fork 0

Fix tests

pull/9730/head
Jordi Boggiano 2021-02-25 11:28:07 +01:00
parent 67261e8d47
commit 46dde9453b
No known key found for this signature in database
GPG Key ID: 7BBD42C429EC80BC
4 changed files with 8 additions and 8 deletions

View File

@ -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);

View File

@ -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');

View File

@ -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');

View File

@ -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');