예제 #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_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);
 }