/**
  * @test
  */
 public function it_is_not_interruped_if_no_timeout_occurs_and_the_probe_was_satisfied()
 {
     $this->pollerStartsTimeoutMechanism();
     $this->probeIsSatisfiedAtSecondRun();
     $this->pollerWaits();
     $this->timeoutNeverOccurs();
     $this->poller->poll($this->probe, $this->timeout);
 }
 public function evaluate($probe, $description = '', $returnResult = false)
 {
     if (is_callable($probe)) {
         $probe = new CallableProbe($probe);
     }
     if (!$probe instanceof ProbeInterface) {
         throw new \InvalidArgumentException('Expected an instance of ProbeInterface');
     }
     try {
         $poller = new Poller();
         $poller->poll($probe, new Timeout(new SystemClock(), $this->waitMilliseconds, $this->timeoutMilliseconds));
     } catch (Interrupted $exception) {
         if ($returnResult) {
             return false;
         } else {
             $this->fail($probe, ($description != '' ? $description . "\n" : '') . 'A timeout has occurred');
         }
     }
     return true;
 }