diff --git a/tests/library/Class/NoticeTest.php b/tests/library/Class/NoticeTest.php index f05c9a365c3332ee2b1c702749b1fabac8a8f054..48b267d1bdc3e7e79e624a9ee2783af41c9a1b39 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();