|
1 | 1 | # Laravel SOAP Client |
2 | 2 |
|
3 | 3 | [](LICENSE.md) |
4 | | -[]() |
| 4 | +[](https://packagist.org/packages/codedredd/laravel-soap) |
5 | 5 |  |
6 | 6 |  |
7 | 7 |
|
|
23 | 23 | Execute the following command to get the latest version of the package: |
24 | 24 |
|
25 | 25 | composer require codedredd/laravel-soap |
26 | | - |
| 26 | + |
27 | 27 | Publish Configuration |
28 | 28 |
|
29 | 29 | php artisan vendor:publish --provider "CodeDredd\Soap\SoapServiceProvider" |
@@ -169,9 +169,9 @@ You may specify additional [Soap request options](https://doc.bccnsoft.com/docs/ |
169 | 169 | $response = Soap::baseWsdl(...)->withOptions([ |
170 | 170 | 'trace' => true, |
171 | 171 | ])->call(...); |
172 | | - |
| 172 | + |
173 | 173 | By default this options are set by the Phpro package: |
174 | | - |
| 174 | + |
175 | 175 | 'trace' => true, |
176 | 176 | 'exceptions' => true, |
177 | 177 | 'keep_alive' => true, |
@@ -223,7 +223,7 @@ If you would like to overwrite the fallback ACTION pattern that will stub all un |
223 | 223 | // Stub a string response for all other actions |
224 | 224 | '*' => Soap::response('Hello World', 200, ['Headers']), |
225 | 225 | ]); |
226 | | - |
| 226 | + |
227 | 227 | One important notice. Because a SOAP API doesn't return only string every response with only a string in the body will be formatted to an array: |
228 | 228 |
|
229 | 229 | //For above example |
@@ -288,20 +288,20 @@ Right now you can only check the action |
288 | 288 | }); |
289 | 289 | //Or shortcut |
290 | 290 | Soap::assertActionSent('Get_Users') |
291 | | - |
| 291 | + |
292 | 292 | If needed, you may assert that a specific request was not sent using the `assertNotSent` method: |
293 | 293 |
|
294 | 294 | Soap::fake(); |
295 | | - |
| 295 | + |
296 | 296 | Soap::baseWsdl('http://test.com/v1?wsdl') |
297 | 297 | ->call('Get_Users'); |
298 | | - |
| 298 | + |
299 | 299 | Soap::assertNotSent(function (Request $request) { |
300 | 300 | return $request->action() === 'Get_Posts'; |
301 | 301 | }); |
302 | | - |
| 302 | + |
303 | 303 | Or, if you would like to assert that no requests were sent, you may use the `assertNothingSent` method: |
304 | 304 |
|
305 | 305 | Soap::fake(); |
306 | | - |
307 | | - Soap::assertNothingSent(); |
| 306 | + |
| 307 | + Soap::assertNothingSent(); |
0 commit comments