예제 #1
0
 function it_returns_an_image_by_code(ImageInterface $image)
 {
     $image->getCode()->willReturn('thumbnail');
     $image->setOwner($this)->shouldBeCalled();
     $this->addImage($image);
     $this->getImageByCode('thumbnail')->shouldReturn($image);
 }
예제 #2
0
파일: Product.php 프로젝트: loic425/Sylius
 /**
  * {@inheritdoc}
  */
 public function addImage(ImageInterface $image)
 {
     $image->setOwner($this);
     $this->images->add($image);
 }