예제 #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 testSetCacheDir()
 {
     ExtensionHelper::setCacheDir(TEST_ROOT . '/tests/cache');
     $this->assertThat(ExtensionHelper::getCacheDir(), $this->equalTo(TEST_ROOT . '/tests/cache/g11n'));
 }
예제 #3
0
파일: G11n.php 프로젝트: elkuku/g11n
 /**
  * Set the cache directory.
  *
  * @param   string  $path  A valid path.
  *
  * @deprecated Use ExtensionHelper::setCacheDir($path)
  *
  * @since  2.0
  * @return void
  */
 public static function setCacheDir($path)
 {
     ExtensionHelper::setCacheDir($path);
 }