public function setUp()
 {
     $config = CopixConfig::Instance();
     if (method_exists($config, 'copixtpl_clearPaths')) {
         $config->copixtpl_clearPaths();
         $config->copixtpl_addPath(COPIX_PROJECT_PATH . 'themes/');
         CopixTpl::clearFilePathCache();
     }
     $config->i18n_path_enabled = true;
     CopixTpl::setTheme('testtheme');
     CopixI18N::setLang('fr');
     CopixI18N::setCountry('FR');
     $this->themeDir = COPIX_PROJECT_PATH . 'themes/testtheme/';
     $this->defaultDir = COPIX_PROJECT_PATH . 'themes/default/';
     $this->moduleDir = CopixModule::getBasePath('copixtest') . '/copixtest/' . COPIX_TEMPLATES_DIR;
 }
 public function testModuleWithoutI18N()
 {
     CopixConfig::Instance()->i18n_path_enabled = false;
     $modulePrefix = CopixModule::getPath('copixtest') . 'www/';
     // Attention ici on teste getResourcePath
     $this->assertEquals($modulePrefix . 'img/module_fr_FR.jpg', CopixUrl::getResourcePath('copixtest|img/module_fr_FR.jpg'));
     $this->assertEquals($modulePrefix . 'img/module_fr.jpg', CopixUrl::getResourcePath('copixtest|img/module_fr.jpg'));
     $this->assertEquals($modulePrefix . 'img/module.jpg', CopixUrl::getResourcePath('copixtest|img/module.jpg'));
     $this->assertEquals('themes/testtheme/modules/copixtest/img/overriden_fr_FR.jpg', CopixUrl::getResourcePath('copixtest|img/overriden_fr_FR.jpg'));
     $this->assertEquals('themes/testtheme/modules/copixtest/img/overriden_fr.jpg', CopixUrl::getResourcePath('copixtest|img/overriden_fr.jpg'));
     $this->assertEquals('themes/testtheme/modules/copixtest/img/overriden.jpg', CopixUrl::getResourcePath('copixtest|img/overriden.jpg'));
 }