Esempio n. 1
0
 private function getNextMatchingExpectation($lastFound, ServerRequestInterface $request, Expectation $expectation)
 {
     if ($this->comparator->equals($request, $expectation)) {
         if ($lastFound === null || $expectation->getPriority() > $lastFound->getPriority()) {
             $lastFound = $expectation;
         }
     }
     return $lastFound;
 }
Esempio n. 2
0
 private function searchForExecutionsCount(Expectation $expectation)
 {
     $count = 0;
     foreach ($this->requestsStorage->listRequests() as $request) {
         if ($this->comparator->equals($request, $expectation)) {
             $count++;
         }
     }
     return $count;
 }