@@ 230-241 (lines=12) @@ | ||
227 | /** |
|
228 | * @test |
|
229 | */ |
|
230 | public function shouldThrowExceptionWhenParameterStyleIsInValid() |
|
231 | { |
|
232 | //when |
|
233 | try { |
|
234 | IsValid::parameterStyle('INVALID_PARAMETER_STYLE', SoapBinding::RPC); |
|
235 | $this->assertFalse(true, 'Triggered when exception is not throw'); |
|
236 | } catch (InvalidArgumentException $e) { |
|
237 | //then |
|
238 | $this->assertEquals('Invalid parameter style [INVALID_PARAMETER_STYLE] available parameter styles: [BARE, WRAPPED]', $e->getMessage()); |
|
239 | $this->assertInstanceOf('\InvalidArgumentException', $e); |
|
240 | } |
|
241 | } |
|
242 | ||
243 | /** |
|
244 | * @test |
|
@@ 246-257 (lines=12) @@ | ||
243 | /** |
|
244 | * @test |
|
245 | */ |
|
246 | public function shouldThrowExceptionWhenSetParameterStyleWrappedForRpc() |
|
247 | { |
|
248 | //when |
|
249 | try { |
|
250 | IsValid::parameterStyle(SoapBinding::WRAPPED, SoapBinding::RPC); |
|
251 | $this->assertFalse(true, 'Triggered when exception is not throw'); |
|
252 | } catch (InvalidArgumentException $e) { |
|
253 | //then |
|
254 | $this->assertEquals('For RPC style parameters cannot be wrapped', $e->getMessage()); |
|
255 | $this->assertInstanceOf('\InvalidArgumentException', $e); |
|
256 | } |
|
257 | } |
|
258 | } |
|
259 |