From 46dde9453b684863a1818c29364af32b9c7e71ec Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Thu, 25 Feb 2021 11:28:07 +0100 Subject: [PATCH] Fix tests --- tests/Composer/Test/Downloader/FileDownloaderTest.php | 4 ++-- tests/Composer/Test/Downloader/FossilDownloaderTest.php | 4 ++-- tests/Composer/Test/Downloader/GitDownloaderTest.php | 4 ++-- tests/Composer/Test/Downloader/HgDownloaderTest.php | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/tests/Composer/Test/Downloader/FileDownloaderTest.php b/tests/Composer/Test/Downloader/FileDownloaderTest.php index 989478386..ead8bc1c1 100644 --- a/tests/Composer/Test/Downloader/FileDownloaderTest.php +++ b/tests/Composer/Test/Downloader/FileDownloaderTest.php @@ -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); diff --git a/tests/Composer/Test/Downloader/FossilDownloaderTest.php b/tests/Composer/Test/Downloader/FossilDownloaderTest.php index 5121d8546..bda892635 100644 --- a/tests/Composer/Test/Downloader/FossilDownloaderTest.php +++ b/tests/Composer/Test/Downloader/FossilDownloaderTest.php @@ -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'); diff --git a/tests/Composer/Test/Downloader/GitDownloaderTest.php b/tests/Composer/Test/Downloader/GitDownloaderTest.php index c16c925b6..6a680c558 100644 --- a/tests/Composer/Test/Downloader/GitDownloaderTest.php +++ b/tests/Composer/Test/Downloader/GitDownloaderTest.php @@ -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'); diff --git a/tests/Composer/Test/Downloader/HgDownloaderTest.php b/tests/Composer/Test/Downloader/HgDownloaderTest.php index cecf78b01..5e4fac523 100644 --- a/tests/Composer/Test/Downloader/HgDownloaderTest.php +++ b/tests/Composer/Test/Downloader/HgDownloaderTest.php @@ -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');