diff --git a/src/Command/Patch/Manager.php b/src/Command/Patch/Manager.php index 6661756..d943400 100644 --- a/src/Command/Patch/Manager.php +++ b/src/Command/Patch/Manager.php @@ -118,7 +118,7 @@ public function applyComposerPatches(InputInterface $input, OutputInterface $out (string)$patchName, (string)$packageName, (string)$constraint, - $deployedFromGit + (bool)$deployedFromGit ); if (null !== $message) { @@ -156,7 +156,7 @@ public function applyHotFixes(InputInterface $input, OutputInterface $output) foreach ($files as $file) { $output->writeln( - $this->applier->applyFile($file, $deployedFromGit) + $this->applier->applyFile($file, (bool)$deployedFromGit) ); } } diff --git a/src/Test/Unit/Command/Patch/ManagerTest.php b/src/Test/Unit/Command/Patch/ManagerTest.php index bb2d775..7028f12 100644 --- a/src/Test/Unit/Command/Patch/ManagerTest.php +++ b/src/Test/Unit/Command/Patch/ManagerTest.php @@ -141,7 +141,7 @@ public function testApplyComposerPatchesWithFSException() $inputMock->method('getOption') ->with(Apply::OPT_GIT_INSTALLATION) - ->willReturn(false); + ->willReturn('0'); $this->manager->applyComposerPatches($inputMock, $outputMock); } @@ -160,8 +160,8 @@ public function testExecuteApplyHotFixes() $this->applierMock->expects($this->exactly(2)) ->method('applyFile') ->willReturnMap([ - [__DIR__ . '/_files/' . Manager::HOT_FIXES_DIR . '/patch1.patch', false, 'Patch 1 applied'], - [__DIR__ . '/_files/' . Manager::HOT_FIXES_DIR . '/patch2.patch', false, 'Patch 2 applied'] + [__DIR__ . '/_files/' . Manager::HOT_FIXES_DIR . '/patch1.patch', true, 'Patch 1 applied'], + [__DIR__ . '/_files/' . Manager::HOT_FIXES_DIR . '/patch2.patch', true, 'Patch 2 applied'] ]); /** @var InputInterface|MockObject $inputMock */ @@ -169,7 +169,7 @@ public function testExecuteApplyHotFixes() $inputMock->expects($this->once()) ->method('getOption') ->with(Apply::OPT_GIT_INSTALLATION) - ->willReturn(false); + ->willReturn('1'); /** @var OutputInterface|MockObject $outputMock */ $outputMock = $this->getMockForAbstractClass(OutputInterface::class); $outputMock->expects($this->exactly(3))