/** * @covers MultiConfig::has */ public function testHas() { $conf = new MultiConfig(array(new HashConfig(array('foo' => 'foo')), new HashConfig(array('something' => 'bleh')), new HashConfig(array('meh' => 'eh')))); $this->assertTrue($conf->has('foo')); $this->assertTrue($conf->has('something')); $this->assertTrue($conf->has('meh')); $this->assertFalse($conf->has('what')); }
// this allows load Nette Framework classes automatically so that // you don't have to litter your code with 'require' statements require LIBS_DIR . '/Nette/loader.php'; require LIBS_DIR . '/Custom/utils.php'; require LIBS_DIR . '/Custom/MultiConfig.php'; // set console mode according to host name if (Environment::isConsole()) { if (php_uname('n') === 'CIKINOTAS') { $name = 'console_dev'; } else { $name = 'console_prod'; } Environment::setName($name); } //$config = Environment::loadConfig(); $config = MultiConfig::load(); //$loader = new RobotLoader(); //$loader->autoRebuild = true; // pokud nenajdu třídu, mám se znovusestavit? //dump($loader); //die(); // debug only //Environment::setMode(Environment::PRODUCTION, 1 ); // Step 2: Configure environment // 2a) enable Debug for better exception and error visualisation Debug::$strictMode = TRUE; // determines whether to consider all errors as fatal // todo: v novsej verzii sa predava uz iba adresar, nie nazov suboru Debug::enable('213.215.67.27, 127.0.0.1', Environment::getVariable('logDir') . '/err.log', '*****@*****.**'); //Debug::enable(false, Environment::getVariable('logDir') . '/err.log', '*****@*****.**'); // always dev mode //Debug::enable('213.215.67.27', Environment::getVariable('logDir') . '/err.log', '*****@*****.**'); //Debug::enable('213.215.67.27, 127.0.0.1', Environment::getVariable('logDir') . '/err.log', '*****@*****.**');