소스 검색

Move test file parsing into try/catch block to avoid phpunit swallowing errors

Nils Adermann 5 년 전
부모
커밋
6a335a459c
1개의 변경된 파일7개의 추가작업 그리고 7개의 파일을 삭제
  1. 7 7
      tests/Composer/Test/InstallerTest.php

+ 7 - 7
tests/Composer/Test/InstallerTest.php

@@ -280,15 +280,15 @@ class InstallerTest extends TestCase
                 continue;
             }
 
-            $testData = $this->readTestFile($file, $fixturesDir);
+            try {
+                $testData = $this->readTestFile($file, $fixturesDir);
 
-            $installed = array();
-            $installedDev = array();
-            $lock = array();
-            $expectLock = array();
-            $expectResult = 0;
+                $installed = array();
+                $installedDev = array();
+                $lock = array();
+                $expectLock = array();
+                $expectResult = 0;
 
-            try {
                 $message = $testData['TEST'];
                 $condition = !empty($testData['CONDITION']) ? $testData['CONDITION'] : null;
                 $composer = JsonFile::parseJson($testData['COMPOSER']);