public function setUp() { $this->arrayThumbPresenter = new ArrayThumbPresenter($this->getPhotoPresenterMock()); $thumbId = new ThumbId(); $url = new HttpUrl('http://test'); $thumbSize = new PhotoThumbSize(15, 10); $this->expected = ['thumbs' => ['10x15' => ['id' => $thumbId->id(), 'url' => $url->value(), 'height' => $thumbSize->height(), 'width' => $thumbSize->width(), 'file' => '']]]; $this->thumb = new PhotoThumb($thumbId, new PhotoId(), $url, $thumbSize); $this->thumbCollection = new PhotoThumbCollection([$this->thumb]); }
/** * @return string */ public function getPhotoHttpUrl() { return $this->photoHttpUrl->value(); }
/** * @test * @dataProvider validHttpUrls * @param $url * @param $expected */ public function httpUrlWorks($url, $expected) { $httpUrl = new HttpUrl($url); $this->assertSame($expected, $httpUrl->value()); }
/** * @return string */ public function photoThumbHttpUrl() { return $this->photoThumbHttpUrl->value(); }