@@ 50-62 (lines=13) @@ | ||
47 | $this->match($request, $responseConfig)->shouldReturn(false); |
|
48 | } |
|
49 | ||
50 | function it_not_match_when_header_value_in_request_is_different_than_expected() |
|
51 | { |
|
52 | $responseConfig = Element::fromArray([ |
|
53 | 'request' => [ |
|
54 | 'path' => '/foo', |
|
55 | 'headers' => ['Header' => 'Value'] |
|
56 | ], |
|
57 | ]); |
|
58 | $request = Request::create('/foo'); |
|
59 | $request->headers->add(['Header' => 'Different Value']); |
|
60 | ||
61 | $this->match($request, $responseConfig)->shouldReturn(false); |
|
62 | } |
|
63 | ||
64 | function it_match_when_headers_from_config_are_equal_headers_from_request() |
|
65 | { |
@@ 68-81 (lines=14) @@ | ||
65 | $this->match($request, $responseConfig)->shouldReturn(false); |
|
66 | } |
|
67 | ||
68 | function it_not_match_when_request_config_body_parameter_does_not_exist_in_request_body() |
|
69 | { |
|
70 | $responseConfig = Element::fromArray([ |
|
71 | 'request' => [ |
|
72 | 'path' => '/foo', |
|
73 | 'request' => [ |
|
74 | 'foo' => 'bar' |
|
75 | ] |
|
76 | ], |
|
77 | ]); |
|
78 | $request = Request::create('/foo', 'POST', []); |
|
79 | ||
80 | $this->match($request, $responseConfig)->shouldReturn(false); |
|
81 | } |
|
82 | ||
83 | function it_not_match_when_request_config_body_parameter_is_different_than_request_body_param() |
|
84 | { |
|
@@ 83-96 (lines=14) @@ | ||
80 | $this->match($request, $responseConfig)->shouldReturn(false); |
|
81 | } |
|
82 | ||
83 | function it_not_match_when_request_config_body_parameter_is_different_than_request_body_param() |
|
84 | { |
|
85 | $responseConfig = Element::fromArray([ |
|
86 | 'request' => [ |
|
87 | 'path' => '/foo', |
|
88 | 'request' => [ |
|
89 | 'foo' => 'bar' |
|
90 | ] |
|
91 | ], |
|
92 | ]); |
|
93 | $request = Request::create('/foo', 'POST', ['foo' => 'baz']); |
|
94 | ||
95 | $this->match($request, $responseConfig)->shouldReturn(false); |
|
96 | } |
|
97 | ||
98 | ||
99 | function it_match_when_request_config_query_and_body_parameters_match_parameters_from_request() |