From 66f2317ffe44dbbc2dae2081d44a01c37486ee6b Mon Sep 17 00:00:00 2001 From: Alex Arnaud <alex.arnaud@biblibre.com> Date: Thu, 15 Oct 2015 15:05:24 +0200 Subject: [PATCH] hotline #29412 - fix tests failure --- tests/library/Class/NoticeTest.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tests/library/Class/NoticeTest.php b/tests/library/Class/NoticeTest.php index f05c9a365c3..48b267d1bdc 100644 --- a/tests/library/Class/NoticeTest.php +++ b/tests/library/Class/NoticeTest.php @@ -127,6 +127,7 @@ class NoticeVignetteTest extends Storm_Test_ModelTestCase { Class_WebService_AllServices::setHttpClient(null); Class_WebService_Vignette::setDefaultHttpClient(null); Class_WebService_Vignette::setFileSystem(null); + Class_Article::setFileWriter(null); parent::tearDown(); } @@ -252,6 +253,11 @@ class NoticeVignetteTest extends Storm_Test_ModelTestCase { /** @test */ public function noticeForArticleWithoutThumbnailShouldGenerateItInTempDir() { + Class_Article::setFileWriter($this->mock() + ->whenCalled('fileExists') + ->with('marsu.jpg') + ->answers(true) + ->beStrict()); $image = $this->mock() ->whenCalled('thumbnailImage') ->with(160, 220, true, true) @@ -265,7 +271,7 @@ class NoticeVignetteTest extends Storm_Test_ModelTestCase { $image_factory = $this->mock() ->whenCalled('newImage') - ->with(Class_Url::absolute('marsu.jpg')) + ->with('marsu.jpg') ->answers($image) ->beStrict(); -- GitLab