Skip to content
Snippets Groups Projects
Commit 66f2317f authored by Alex Arnaud's avatar Alex Arnaud
Browse files

hotline #29412 - fix tests failure

parent 3b56184b
Branches
Tags
1 merge request!1161Hotline#29412 articles thumbnails in search results
......@@ -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();
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment