Exemplo n.º 1
0
 /**
  * Handle error if it's in console environment.
  *
  * @return integer
  */
 public function handle()
 {
     if (!Debugger::isCli()) {
         return Handler::DONE;
     }
     $this->printException($this->getException());
     if ($this->exit !== null) {
         exit(intval($this->exit));
     }
     return Handler::DONE;
 }
Exemplo n.º 2
0
 public function testIsCli()
 {
     // tests are ran from CLI so this should be true
     $this->assertTrue(Debugger::isCli());
     $this->assertFalse(Debugger::isWebRequest());
 }