/**
  * Check for forced edition in config file. If edition is not specified,
  * determine it by ClassMap existence.
  *
  * @return string
  */
 protected function findEdition()
 {
     if (!class_exists('OxidEsales\\EshopCommunity\\Core\\Registry') || !Registry::instanceExists('oxConfigFile')) {
         $configFile = new ConfigFile(getShopBasePath() . "config.inc.php");
     }
     $configFile = isset($configFile) ? $configFile : Registry::get('oxConfigFile');
     $edition = $configFile->getVar('edition') ?: $this->findEditionByClassMap();
     $configFile->setVar('edition', $edition);
     return strtoupper($edition);
 }
Example #2
0
 public function testInstanceExists()
 {
     oxRegistry::set("testKey", "testVal");
     $this->assertTrue(Registry::instanceExists('testKey'));
     oxRegistry::set("testKey", null);
     $this->assertFalse(Registry::instanceExists('testKey'));
 }