Skip to content
Snippets Groups Projects
Commit 124a1e99 authored by Patrick Barroca's avatar Patrick Barroca :grin:
Browse files

rel #30143: fix tests

parent aefaba07
Branches
Tags
2 merge requests!1148Dev#30143 create album record thumbnail from first image,!1137Dev#30143 create album record thumbnail from first image
......@@ -199,22 +199,25 @@ class NoticeVignetteTest extends Storm_Test_ModelTestCase {
/** @test */
public function noticeForArticleWithoutThumbnailShouldGenerateItInTempDir() {
$image = Storm_Test_ObjectWrapper::mock();
Class_WebService_Thumbnail_Provider_Article::setDefaultImageFactory(
Storm_Test_ObjectWrapper::mock()
->whenCalled('newImage')
->with(Class_Url::absolute('marsu.jpg'))
->answers($image)
->beStrict());
$image
->whenCalled('thumbnailImage')
->with(160, 220, true, true)
->answers(null)
->whenCalled('writeImage')
->with(PATH_TEMP . 'vignettes_titre/SPIROU.jpg')
->answers(null)
->beStrict();
$image = $this->mock()
->whenCalled('thumbnailImage')
->with(160, 220, true, true)
->answers(null)
->whenCalled('writeImage')
->with(PATH_TEMP . 'vignettes_titre/SPIROU.jpg')
->answers(null)
->beStrict();
$image_factory = $this->mock()
->whenCalled('newImage')
->with(Class_Url::absolute('marsu.jpg'))
->answers($image)
->beStrict();
Class_Notice_Thumbnail_ProviderAbstract::setDefaultImageFactory($image_factory);
$this->assertEquals('/temp/vignettes_titre/SPIROU.jpg',
$this->_notice_article_without_thumbnails->fetchUrlLocalVignette());
......
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