Hal\MutaTesting\Event\MutationEvent::getUnit PHP Method

getUnit() public method

public getUnit ( )
    public function getUnit()
    {
        return $this->unit;
    }

Usage Example

 public function onMutation(MutationEvent $event)
 {
     if (!$event->getUnit()) {
         $this->progress('<error>E</error>');
         return;
     }
     if (!$event->getUnit()->hasFail()) {
         $this->progress('L');
     } else {
         $this->progress('.');
     }
 }