コード例 #1
0
ファイル: TaxonSpec.php プロジェクト: gabiudrescu/Sylius
 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);
 }