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); }
function it_returns_an_array_of_with_a_single_parent_taxon(TaxonInterface $parentTaxon) { $parentTaxon->getParent()->willReturn(null); $this->setParent($parentTaxon); $this->getParents()->shouldReturn([$parentTaxon]); }