/**
  * @covers phpDocumentor\Event\DebugEvent::getContext
  * @covers phpDocumentor\Event\DebugEvent::setContext
  */
 public function testSupplyAContextArrayForTheMessage()
 {
     $context = array('test' => 'test2');
     $this->assertSame(array(), $this->fixture->getContext());
     $this->fixture->setContext($context);
     $this->assertSame($context, $this->fixture->getContext());
 }
Esempio n. 2
0
 /**
  * Dispatches a logging request to log a debug message.
  *
  * @param string $message The message to log.
  *
  * @return void
  */
 public function debug($message)
 {
     Dispatcher::getInstance()->dispatch('system.debug', DebugEvent::createInstance($this)->setMessage($message));
 }
Esempio n. 3
0
 /**
  * Dispatches a logging request to log a debug message.
  *
  * @param string $message The message to log.
  *
  * @return void
  */
 public function debug($message)
 {
     $this->dispatch('system.debug', \phpDocumentor\Event\DebugEvent::createInstance($this)->setMessage($message));
 }
Esempio n. 4
0
 /**
  * Dispatches a logging request to log a debug message.
  *
  * @param string $message The message to log.
  *
  * @return void
  */
 public function debug($message)
 {
     if (class_exists('phpDocumentor\\Event\\Dispatcher')) {
         Dispatcher::getInstance()->dispatch('system.debug', DebugEvent::createInstance($this)->setMessage($message));
     }
 }