Example #1
0
 public function testCfg()
 {
     // System / Configuration
     // general
     $this->assertTrue(is_bool(Praxigento_LoginAs_Config::cfgGeneralEnabled()));
     $this->assertTrue(is_bool(Praxigento_LoginAs_Config::cfgGeneralLogEvents()));
     // UI
     $this->assertTrue(is_bool(Praxigento_LoginAs_Config::cfgUiCustomersGridActionEnabled()));
     $this->assertTrue(is_bool(Praxigento_LoginAs_Config::cfgUiOrdersGridColumnEnabled()));
 }
Example #2
0
 /**
  * Internal dispatcher for the called log method.
  * @param $message
  * @param $throwable
  * @param $log4phpMethod
  * @param $zendLevel
  */
 private function doLog($message, $throwable, $log4phpMethod, $zendLevel)
 {
     if (Praxigento_LoginAs_Config::cfgGeneralLogEvents()) {
         if (self::$_isLog4phpUsed) {
             $this->_loggerLog4php->{$log4phpMethod}($message, $throwable);
         } else {
             Mage::log($this->_name . ': ' . $message, $zendLevel);
             if ($throwable instanceof Exception) {
                 Mage::logException($throwable);
             }
         }
     }
 }