public function testLoggersConfigured() { $options = Fixtures::getPhpArrayConfig(); // Mocking the ConfigLoader with the load method $configLoader = $this->getMockBuilder('Cascade\\Config\\ConfigLoader')->disableOriginalConstructor()->setMethods(array('load'))->getMock(); $configLoader->method('load')->willReturn($options); $config = new Config($options, $configLoader); $config->load(); $config->configure(); $this->assertTrue(Registry::hasLogger('my_logger')); }
/** * Load configuration options from a file or a string * * @param string $resource path to config file or string or array */ public static function fileConfig($resource) { self::$config = new Config($resource, new ConfigLoader()); self::$config->load(); self::$config->configure(); }