예제 #1
0
 /**
  * @param result $result   Result or exception.
  * @param array  $acceptor Acceptor configuration being checked.
  *
  * @return bool
  */
 private function matchesStatus($result, array $acceptor)
 {
     if ($result instanceof ResultInterface) {
         return $acceptor['expected'] == $result['@metadata']['statusCode'];
     } elseif ($result instanceof AwsException && ($response = $result->getResponse())) {
         return $acceptor['expected'] == $response->getStatusCode();
     } else {
         return false;
     }
 }