コード例 #1
0
 /**
  * @param $key
  * @return string
  */
 protected function trans($key)
 {
     return $this->trans->trans($key);
 }
コード例 #2
0
ファイル: TransTest.php プロジェクト: stuartmclean/my_website
 /**
  * @covers Trans::loadTranslations
  */
 public function testLoadTranslationsOtherLn()
 {
     $expected = ['global' => 'weltweit', 'comma' => 'Komma', 'no' => 'nein', 'yes' => 'ja'];
     Config::addConfigFromPath(__DIR__ . '/testConfig.php');
     Config::setLn('de');
     $model = new Trans('testTrans');
     $model->loadTranslations();
     $result = $model->getAllTranslations();
     $this->assertEquals($expected, $result);
 }