Exemple #1
0
 /**
  *	View - Сформатировать ссылку
  **/
 public static function url($action, $language = null)
 {
     if ($language == null) {
         $language = Translate::getLocale();
     }
     if ($language == Translate::DEFAULT_LOCALE) {
         return '/?action=' . $action;
     } else {
         return '/?action=' . $action . '&language=' . $language;
     }
 }
 public function testSetLocale()
 {
     $this->translate->setLocale('en_GB');
     $this->locale->expects($this->never())->method('getLocaleCode');
     $this->assertEquals('en_GB', $this->translate->getLocale());
 }