code: public function hasOks($output)
      {
          $result = preg_match_all("%##teamcity\[testFinished%", $output);
          if ($result) {
              $this->okCount += $result;
              return $this->okCount;
          }
          return false;
      }
docs: Parse the test adapter result output and count ok results.
  
  This assumes the output is in Test Anywhere Protocol (TAP) format.
  
  @param string $output
  @return bool|int