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]);
 }
예제 #2
0
 /**
  * @return string
  */
 public function getPhotoHttpUrl()
 {
     return $this->photoHttpUrl->value();
 }
예제 #3
0
 /**
  * @test
  * @dataProvider validHttpUrls
  * @param $url
  * @param $expected
  */
 public function httpUrlWorks($url, $expected)
 {
     $httpUrl = new HttpUrl($url);
     $this->assertSame($expected, $httpUrl->value());
 }
예제 #4
0
 /**
  * @return string
  */
 public function photoThumbHttpUrl()
 {
     return $this->photoThumbHttpUrl->value();
 }