forked from amabnl/amadeus-ws-client
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request amabnl#13 in FLIGHT/service.amadeus from feature/V…
…AN-454-service.amadeus-search-implement to master * commit '70086939ed82ccbaa5fc53ae5f5443ef5c078672': VAN-454 service.amadeus / search / implement non-stop filter - added non-stop filter VAN-454 service.amadeus / search / implement non-stop filter - fixed bug airline-filter bug
- Loading branch information
Showing
10 changed files
with
180 additions
and
205 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
{ | ||
"search-hash": "", | ||
"flight-hash": "", | ||
"agent": "fluege.de", | ||
"departure": [ | ||
"BER" | ||
], | ||
"depart-at": [ | ||
1514725420 | ||
], | ||
"is-flexible-date": [ | ||
], | ||
"arrival": [ | ||
"LON" | ||
], | ||
"adults": 2, | ||
"children": 0, | ||
"infants": 0, | ||
"is-synthetic": false, | ||
"filter-airline": [ | ||
"LH", "AB", "4U", "EJ" | ||
], | ||
"filter-cabin-class": [ | ||
"Y", "F" | ||
], | ||
"filter-arrive-before": [ | ||
|
||
], | ||
"filter-depart-after": [ | ||
|
||
], | ||
"filter-duration": [ | ||
|
||
], | ||
"filter-free-beggage": false, | ||
"filter-identical-origin": false, | ||
"filter-airports": [ | ||
|
||
], | ||
"filter-payment-method": [ | ||
|
||
], | ||
"filter-price-min": "", | ||
"filter-price-max": "", | ||
"filter-stops": 0, | ||
"page": 1, | ||
"legs": [ | ||
{ | ||
"departure": "BER", | ||
"arrival": "LON", | ||
"depart-at": 1514725420, | ||
"is-flexible-date": false, | ||
"filter": [ | ||
|
||
] | ||
} | ||
], | ||
"business-cases": [ | ||
[ | ||
{ | ||
"content-provider": "amadeus", | ||
"type": "one-way", | ||
"fare-type": "net", | ||
"options": { | ||
"is-one-way-combination": true, | ||
"is-overnight": false, | ||
"is-area-search": false, | ||
"is-benchmark": false, | ||
"result-limit": 1 | ||
}, | ||
"authentication": { | ||
"office-id": "LEJL128AC", | ||
"user-id": "WSTBDUFI", | ||
"password-data": "dkhBM1J5VTU=", | ||
"password-length": 8, | ||
"duty-code": "SU", | ||
"organization-id": "NMC-GERMAN" | ||
} | ||
} | ||
] | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<?php | ||
/** @var \Codeception\Scenario $scenario */ | ||
$I = new ApiTester($scenario); | ||
$I->wantTo('see an response that matches the response schema even if I set all supported filters'); | ||
$I->sendPOST( | ||
'/flight-search/', | ||
file_get_contents(codecept_data_dir('requests/valid-request-with-filters.json')) | ||
); | ||
$I->seeResponseCodeIs(200); | ||
$I->seeHttpHeader('content-type', 'application/hal+json'); | ||
|
||
$response = $I->grabResponse(); | ||
|
||
$validator = new \JsonSchema\Validator(); | ||
$validator->validate( | ||
$response, | ||
(object)[ | ||
'$ref' => 'file://' . codecept_data_dir('schema/response-schema.json') | ||
] | ||
); | ||
|
||
$I->expect($validator->isValid()); | ||
|
||
$I->seeResponseHasLinkToSelf('/flight-search/'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.