瀏覽代碼

Fix 7.4 build

Jordi Boggiano 5 年之前
父節點
當前提交
21ab2f85bb

+ 2 - 1
tests/Composer/Test/Command/RunScriptCommandTest.php

@@ -66,7 +66,8 @@ class RunScriptCommandTest extends TestCase
 
         $ed->expects($this->once())
             ->method('dispatchScript')
-            ->with($scriptName, $expectedDevMode, array());
+            ->with($scriptName, $expectedDevMode, array())
+            ->willReturn(0);
 
         $composer = $this->createComposerInstance();
         $composer->setEventDispatcher($ed);

+ 5 - 1
tests/Composer/Test/Package/Archiver/ArchivableFilesFinderTest.php

@@ -309,7 +309,11 @@ class ArchivableFilesFinderTest extends TestCase
 
     protected function getArchivedFiles($command)
     {
-        $process = new Process($command, $this->sources);
+        if (method_exists('Symfony\Component\Process\Process', 'fromShellCommandline')) {
+            $process = Process::fromShellCommandline($command, $this->sources);
+        } else {
+            $process = new Process($command, $this->sources);
+        }
         $process->run();
 
         $archive = new \PharData($this->sources.'/archive.zip');