示例#1
0
        return 0755;
    }
}
if (!function_exists('getDefaultConfigFileMode')) {
    /**
     * Returns mode which must be set for config file
     *
     * @return int
     */
    function getDefaultConfigFileMode()
    {
        return 0444;
    }
}
$editionSelector = new EditionSelector();
if (!function_exists('getSerial') && !$editionSelector->isCommunity()) {
    /**
     * Creates and returns oxSerial object
     *
     * @return Serial
     */
    function getSerial()
    {
        return new Serial();
    }
}
if (!class_exists("Config")) {
    /**
     * Config file loader class
     */
    class Config
 /**
  * When oxConfigFile is not registered in registry (happens during setup), it should be created on the fly.
  */
 public function testForcingEditionByConfigWhenNotRegistered()
 {
     $path = $this->createFile('config.inc.php', '<?php $this->edition = "EE";');
     $this->setConfigParam('sShopDir', dirname($path));
     $configFile = oxRegistry::get('oxConfigFile');
     oxRegistry::set('oxConfigFile', null);
     $editionSelector = new EditionSelector();
     $this->assertTrue($editionSelector->isEnterprise());
     $this->assertFalse($editionSelector->isCommunity());
     $this->assertFalse($editionSelector->isProfessional());
     oxRegistry::set('oxConfigFile', $configFile);
 }