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