/** * Setup Log * * @param array $options * @return Robo47_Log */ protected function _setupLog($options) { $registryKey = null; if (isset($options['registryKey'])) { $registryKey = $options['registryKey']; unset($options['registryKey']); } $log = Robo47_Log::factory($options); if (null !== $registryKey) { Zend_Registry::set($registryKey, $log); } return $log; }
/** * @covers Robo47_Log::factory */ public function testFactoryThrowsExceptionWithEmptyConfigArray() { $config = array(); try { $log = Robo47_Log::factory($config); $this->fail('No Exception thrown'); } catch (Robo47_Log_Exception $e) { $this->assertEquals('Configuration must be an array or instance of Zend_Config', $e->getMessage(), 'Wrong Exception message'); } }