Ejemplo n.º 1
0
 /**
  * Ensure that a loaded language file will not be loaded again
  *
  * @return void
  */
 public function testAlreadyLoadedFileWillNotBeLoadedTwice()
 {
     $this->translator->load();
     $this->assertArrayHasKey('test_message', $this->translator->all());
     $this->translator->load();
     $this->assertTrue($this->translator->hasBeenLoaded('en'));
 }
Ejemplo n.º 2
0
 /**
  * Set the application translation instance.
  *
  * @param $translator
  */
 public function setTranslationInstance($translator)
 {
     if (is_null($translator)) {
         $this->translator = new Translator(__DIR__ . '/lang/');
     } else {
         $this->translator = $translator;
     }
     $this->translator->load();
 }