tutu/src/Coduo/TuTu/spec/Coduo/TuTu/Request/HeadersMatchingPolicySpec.php 1 location
|
@@ 64-82 (lines=19) @@
|
61 |
|
$this->match($request, $responseConfig)->shouldReturn(false); |
62 |
|
} |
63 |
|
|
64 |
|
function it_match_when_headers_from_config_are_equal_headers_from_request() |
65 |
|
{ |
66 |
|
$responseConfig = Element::fromArray([ |
67 |
|
'request' => [ |
68 |
|
'path' => '/foo', |
69 |
|
'headers' => [ |
70 |
|
'Header' => 'Value', |
71 |
|
'Header1' => 'Value1' |
72 |
|
] |
73 |
|
], |
74 |
|
]); |
75 |
|
$request = Request::create('/foo'); |
76 |
|
$request->headers->add([ |
77 |
|
'Header' => 'Value', |
78 |
|
'Header1' => 'Value1' |
79 |
|
]); |
80 |
|
|
81 |
|
$this->match($request, $responseConfig)->shouldReturn(true); |
82 |
|
} |
83 |
|
} |
84 |
|
|
tutu/src/Coduo/TuTu/spec/Coduo/TuTu/Request/ParameterMatchingPolicySpec.php 1 location
|
@@ 99-115 (lines=17) @@
|
96 |
|
} |
97 |
|
|
98 |
|
|
99 |
|
function it_match_when_request_config_query_and_body_parameters_match_parameters_from_request() |
100 |
|
{ |
101 |
|
$responseConfig = Element::fromArray([ |
102 |
|
'request' => [ |
103 |
|
'path' => '/foo', |
104 |
|
'query' => [ |
105 |
|
'foo' => 'bar' |
106 |
|
], |
107 |
|
'request' => [ |
108 |
|
'foo' => 'bar' |
109 |
|
] |
110 |
|
], |
111 |
|
]); |
112 |
|
$request = Request::create('/foo?foo=bar', 'POST', ['foo' => 'bar']); |
113 |
|
|
114 |
|
$this->match($request, $responseConfig)->shouldReturn(true); |
115 |
|
} |
116 |
|
} |
117 |
|
|