/** * Then /^I see "<header>" header to "<action>" (?:an|a|for|to|the) "<object>" */ public function iSeeResponseHeaderToObjectAction($header, $action, $object) { $expected = $this->restClient->constructSpecialHeader($object, $action); $expected = substr($expected, 0, strpos($expected, '+')); $actual = $this->restClient->getResponseHeader($header); $actual = substr($actual, 0, strpos($actual, '+')); Assertion::assertEquals($expected, $actual, "Expected '{$header}' header with '{$expected}' value found it with '{$actual}' value "); }
/** * @Then response header :header don't have :value (value) */ public function assertHeaderDontHaveValue($header, $value) { Assertion::assertNotEquals($value, $this->restDriver->getResponseHeader($header), "Unexpected '{$header}' header found with '{$this->restDriver->getHeader($header)}' value"); }