コード例 #1
0
ファイル: ProductSpec.php プロジェクト: Silwereth/Sylius
 function it_can_get_taxons_from_specific_taxonomy(TaxonInterface $taxon1, TaxonInterface $taxon2, TaxonInterface $taxon3, TaxonomyInterface $taxonomy1, TaxonomyInterface $taxonomy2)
 {
     $taxon1->getTaxonomy()->willReturn($taxonomy1);
     $taxon2->getTaxonomy()->willReturn($taxonomy1);
     $taxon3->getTaxonomy()->willReturn($taxonomy2);
     $taxonomy1->getName()->willReturn('Category');
     $taxonomy2->getName()->willReturn('Brand');
     $this->addTaxon($taxon1);
     $this->addTaxon($taxon2);
     $this->addTaxon($taxon3);
     $this->getTaxons('category')->shouldHaveCount(2);
     $this->getTaxons('brand')->shouldHaveCount(1);
 }