Exemplo n.º 1
0
 function it_calls_translation_to_string(TaxonomyTranslation $translation)
 {
     $translation->getLocale()->willReturn('en_US');
     $translation->setTranslatable($this)->shouldBeCalled();
     $this->addTranslation($translation);
     $translation->__toString()->shouldBeCalled();
     $this->__toString();
 }
Exemplo n.º 2
0
 function it_also_sets_translation_on_root_taxon(TaxonInterface $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);
 }