Exemple #1
0
 function it_returns_an_image_by_code(TaxonImageInterface $image)
 {
     $image->getCode()->willReturn('thumbnail');
     $image->setTaxon($this)->shouldBeCalled();
     $this->addImage($image);
     $this->getImageByCode('thumbnail')->shouldReturn($image);
 }
Exemple #2
0
 /**
  * {@inheritdoc}
  */
 public function addImage(TaxonImageInterface $image)
 {
     $image->setTaxon($this);
     $this->images->add($image);
 }