From 3916916a8975f46a2446cc76401226440c350b25 Mon Sep 17 00:00:00 2001 From: Thiago Rodrigues Date: Fri, 23 Sep 2016 21:43:46 -0300 Subject: [PATCH] Fix #1 - some files are not being overridden --- src/Converter/GhostscriptConverter.php | 2 +- tests/Converter/GhostscriptConverterTest.php | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Converter/GhostscriptConverter.php b/src/Converter/GhostscriptConverter.php index a31f3bc..b378b29 100644 --- a/src/Converter/GhostscriptConverter.php +++ b/src/Converter/GhostscriptConverter.php @@ -71,6 +71,6 @@ public function convert($file, $newVersion) if (!$this->fs->exists($tmpFile)) throw new \RuntimeException("The generated file '{$tmpFile}' was not found."); - $this->fs->copy($tmpFile, $file); + $this->fs->copy($tmpFile, $file, true); } } diff --git a/tests/Converter/GhostscriptConverterTest.php b/tests/Converter/GhostscriptConverterTest.php index d1d1a92..7a79edb 100644 --- a/tests/Converter/GhostscriptConverterTest.php +++ b/tests/Converter/GhostscriptConverterTest.php @@ -48,7 +48,8 @@ public function testMustConvertPDFVersionWithSuccess($file, $newVersion) ; $fs->copy( Argument::type('string'), - $file + $file, + true ) ->willReturn(true) ->shouldBeCalled()