From 6a335a459cd0c244813ff98251c4da6e6eb8c089 Mon Sep 17 00:00:00 2001 From: Nils Adermann Date: Tue, 29 Oct 2019 23:08:03 +0100 Subject: [PATCH] Move test file parsing into try/catch block to avoid phpunit swallowing errors --- tests/Composer/Test/InstallerTest.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/tests/Composer/Test/InstallerTest.php b/tests/Composer/Test/InstallerTest.php index c3b957afb..a5da19c05 100644 --- a/tests/Composer/Test/InstallerTest.php +++ b/tests/Composer/Test/InstallerTest.php @@ -280,15 +280,15 @@ class InstallerTest extends TestCase continue; } - $testData = $this->readTestFile($file, $fixturesDir); - - $installed = array(); - $installedDev = array(); - $lock = array(); - $expectLock = array(); - $expectResult = 0; - try { + $testData = $this->readTestFile($file, $fixturesDir); + + $installed = array(); + $installedDev = array(); + $lock = array(); + $expectLock = array(); + $expectResult = 0; + $message = $testData['TEST']; $condition = !empty($testData['CONDITION']) ? $testData['CONDITION'] : null; $composer = JsonFile::parseJson($testData['COMPOSER']);