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_allows_to_remove_child_taxons(TaxonomyInterface $taxonomy, TaxonInterface $taxon) { $this->setTaxonomy($taxonomy); $taxon->setTaxonomy($taxonomy)->shouldBeCalled(); $taxon->setParent($this)->shouldBeCalled(); $this->addChild($taxon); $taxon->setTaxonomy(null)->shouldBeCalled(); $taxon->setParent(null)->shouldBeCalled(); $this->removeChild($taxon); }