/**
  * @param cfhCompile_Compiler_Event $event
  */
 public function notify(cfhCompile_Compiler_Event $event)
 {
     $msg = '';
     switch ($event->getEvent()) {
         case cfhCompile_Compiler_Event::EVENT_BEGIN:
             $msg .= 'BEGIN ';
             break;
         case cfhCompile_Compiler_Event::EVENT_CLASS:
             $msg .= 'CLASS ';
             break;
         case cfhCompile_Compiler_Event::EVENT_COMMIT:
             $msg .= 'COMMIT ';
             break;
         case cfhCompile_Compiler_Event::EVENT_ROLLBACK:
             $msg .= 'ROLLBACK ';
             break;
         case cfhCompile_Compiler_Event::EVENT_SKIP:
             $msg .= 'SKIP ';
             break;
         case cfhCompile_Compiler_Event::EVENT_NOTFOUND:
             $msg .= 'NOTFOUND ';
             break;
         case cfhCompile_Compiler_Event::EVENT_WRITE:
             $msg .= 'WRITE ';
             break;
     }
     if ($event->getClass()) {
         $msg .= $event->getClass()->getName();
     }
     $msg = trim($msg) . PHP_EOL;
     fwrite($this->fp, $msg, strlen($msg));
 }
Exemplo n.º 2
0
 public function testCloneChangesId()
 {
     $clone = clone $this->event;
     $this->assertNotEquals($this->event->getId(), $clone->getId());
 }