예제 #1
0
 function it_allows_to_remove_child_taxons(TaxonInterface $taxon)
 {
     $taxon->getParent()->willReturn(null);
     $taxon->setParent($this)->shouldBeCalled();
     $this->addChild($taxon);
     $taxon->setParent(null)->shouldBeCalled();
     $this->removeChild($taxon);
 }
예제 #2
0
 function it_returns_an_array_of_with_a_single_parent_taxon(TaxonInterface $parentTaxon)
 {
     $parentTaxon->getParent()->willReturn(null);
     $this->setParent($parentTaxon);
     $this->getParents()->shouldReturn([$parentTaxon]);
 }