public function createSpecificationWithMoreThanOneHeaderInResponseTest(AcceptanceTester $I) { $I->wantTo('create an specification with several headers in response'); $request = new Request(); $request->setUrl(new Condition('isEqualTo', '/the/request/url')); $response = new Response(); $response->setHeaders(['Location' => '/potato.php', 'Cache-Control' => 'private, max-age=0, no-cache', 'Pragma' => 'no-cache']); $specification = new Expectation(); $specification->setRequest($request)->setResponse($response); $I->haveHttpHeader('Content-Type', 'application/json'); $I->sendPOST('/__phiremock/expectations', $specification); $I->sendGET('/__phiremock/expectations'); $I->seeResponseCodeIs(200); $I->seeResponseIsJson(); $I->seeResponseEquals('[{"scenarioName":null,"scenarioStateIs":null,"newScenarioState":null,' . '"request":{"method":null,"url":{"isEqualTo":"\\/the\\/request\\/url"},"body":null,"headers":null},' . '"response":{"statusCode":200,"body":null,"headers":{' . '"Location":"\\/potato.php","Cache-Control":"private, max-age=0, no-cache",' . '"Pragma":"no-cache"},"delayMillis":null},' . '"proxyTo":null,"priority":0}]'); }