From bd6b4e433c6118bf286b8ee7bc9cae9bd715b47e Mon Sep 17 00:00:00 2001 From: Nils Adermann Date: Thu, 7 Nov 2019 22:09:24 +0100 Subject: [PATCH] Use JsonFile::JSON_PRETTY_PRINT instead of php const for PHP 5.3 compat --- tests/Composer/Test/InstallerTest.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/Composer/Test/InstallerTest.php b/tests/Composer/Test/InstallerTest.php index 95fe7b89e..758121979 100644 --- a/tests/Composer/Test/InstallerTest.php +++ b/tests/Composer/Test/InstallerTest.php @@ -93,7 +93,7 @@ class InstallerTest extends TestCase $lockJsonMock->expects($this->any()) ->method('write') ->will($this->returnCallback(function ($value, $options = 0) use (&$lockData) { - $lockData = json_encode($value, JSON_PRETTY_PRINT); + $lockData = json_encode($value, JsonFile::JSON_PRETTY_PRINT); })); $tempLockData = null; @@ -216,7 +216,7 @@ class InstallerTest extends TestCase $repositoryManager->setLocalRepository(new InstalledFilesystemRepositoryMock($jsonMock)); // emulate a writable lock file - $lockData = $lock ? json_encode($lock, JSON_PRETTY_PRINT): null; + $lockData = $lock ? json_encode($lock, JsonFile::JSON_PRETTY_PRINT): null; $lockJsonMock = $this->getMockBuilder('Composer\Json\JsonFile')->disableOriginalConstructor()->getMock(); $lockJsonMock->expects($this->any()) ->method('read') @@ -231,7 +231,7 @@ class InstallerTest extends TestCase $lockJsonMock->expects($this->any()) ->method('write') ->will($this->returnCallback(function ($value, $options = 0) use (&$lockData) { - $lockData = json_encode($value, JSON_PRETTY_PRINT); + $lockData = json_encode($value, JsonFile::JSON_PRETTY_PRINT); })); if ($expectLock) {