Beispiel #1
0
 public function read()
 {
     if (feof($this->pipes[1])) {
         $this->state = self::STATE_FINALIZE;
         return;
     }
     $char = fread($this->pipes[1], 1);
     $this->output .= $char;
     if (in_array($char, [".", "S", "F", "E"])) {
         $this->testHub->notifyTest($char);
     } elseif ($this->lastChar == "F" && $char == "a") {
         $this->state = self::STATE_FINALIZE;
         return;
     }
     if ($this->lastChar === $char && $char === "\n") {
         $this->state = self::STATE_CLOSE;
     }
     $this->lastChar = $char;
 }