Beispiel #1
0
 function it_also_sets_name_on_the_root_taxon(Taxon $taxon)
 {
     $taxon->setName('Category')->shouldBeCalled();
     $taxon->setTaxonomy($this)->shouldBeCalled();
     $taxon->setCurrentLocale('en_US')->shouldBeCalled();
     $taxon->setFallbackLocale('en_US')->shouldBeCalled();
     $this->setRoot($taxon);
     $this->setName('Category');
 }
Beispiel #2
0
 function it_also_sets_translation_on_root_taxon(Taxon $taxon, TaxonomyTranslation $translation)
 {
     $translation->getName()->willReturn('New');
     $translation->getLocale()->shouldBeCalled();
     $translation->setTranslatable($this)->shouldBeCalled();
     $taxon->setName('New')->shouldBeCalled();
     $taxon->setTaxonomy($this)->shouldBeCalled();
     $taxon->setCurrentLocale(Argument::any())->shouldBeCalled();
     $taxon->setFallbackLocale(Argument::any())->shouldBeCalled();
     $this->setRoot($taxon);
     $this->addTranslation($translation);
 }