예제 #1
0
파일: G11nTest.php 프로젝트: elkuku/g11n
 /**
  * Sets up the fixture, for example, opens a network connection.
  * This method is called before a test is executed.
  *
  * @return void
  */
 protected function setUp()
 {
     ExtensionHelper::setCacheDir(TEST_ROOT . '/tests/cache');
     ExtensionHelper::cleanCache();
     ExtensionHelper::addDomainPath('testDomain', TEST_ROOT . '/tests/testLangDir');
     ExtensionHelper::addDomainPath('testDomain1', TEST_ROOT . '/tests/testLangDir');
     ExtensionHelper::addDomainPath('testDomain2', TEST_ROOT . '/tests/testLangDir');
     G11n::setCurrent('xx-XX');
     G11n::loadLanguage('testExtension', 'testDomain');
 }
예제 #2
0
 /**
  * Test method.
  *
  * @return void
  */
 public function testIsNotExtension()
 {
     ExtensionHelper::addDomainPath('foo', 'bar');
     $this->assertThat(ExtensionHelper::isExtension('bla', 'foo'), $this->equalTo(false));
 }
예제 #3
0
파일: G11n.php 프로젝트: elkuku/g11n
 /**
  * Add a path to search for language files.
  *
  * @param   string  $domain  The domain name.
  * @param   string  $path    A path to search for language files.
  *
  * @deprecated Use ExtensionHelper::addDomainPath($domain, $path)
  *
  * @since  2.0
  * @return void
  */
 public static function addDomainPath($domain, $path)
 {
     ExtensionHelper::addDomainPath($domain, $path);
 }