public function setUp(array $expectations)
{
/** @var Expectation $expectation */
foreach ($expectations as $expectation) {
$response = $this->getClient()->post('/_expectation', null, ['matcher' => serialize($expectation->getMatcherClosures()), 'limiter' => serialize($expectation->getLimiter()), 'response' => serialize($expectation->getResponse())])->send();
if ($response->getStatusCode() !== 201) {
throw new RuntimeException('Could not set up expectations');
}
}
}