forked from Sylius/Sylius
-
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.
[API][Shop] Add missing contract test for getting only countries from…
… current channel
- Loading branch information
Showing
3 changed files
with
72 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
Sylius\Component\Core\Model\Channel: | ||
channel_web: | ||
code: 'WEB' | ||
name: 'Web Channel' | ||
hostname: 'localhost' | ||
contactEmail: '[email protected]' | ||
description: 'Lorem ipsum' | ||
baseCurrency: '@currency_usd' | ||
defaultLocale: '@locale_en' | ||
locales: ['@locale_en', '@locale_pl'] | ||
color: 'black' | ||
enabled: true | ||
taxCalculationStrategy: 'order_items_based' | ||
countries: ['@country_US', '@country_FR'] | ||
|
||
Sylius\Component\Currency\Model\Currency: | ||
currency_usd: | ||
code: 'USD' | ||
|
||
Sylius\Component\Locale\Model\Locale: | ||
locale_en: | ||
code: 'en_US' | ||
locale_pl: | ||
code: 'pl_PL' | ||
locale_de: | ||
code: 'de_DE' |
35 changes: 35 additions & 0 deletions
35
tests/Api/Responses/shop/country/get_countries_from_channel_response.json
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,35 @@ | ||
{ | ||
"@context": "\/api\/v2\/contexts\/Country", | ||
"@id": "\/api\/v2\/shop\/countries", | ||
"@type": "hydra:Collection", | ||
"hydra:member": [ | ||
{ | ||
"@id": "\/api\/v2\/shop\/countries\/US", | ||
"@type": "Country", | ||
"code": "US", | ||
"name": "United States", | ||
"provinces": [ | ||
{ | ||
"@id": "\/api\/v2\/shop\/provinces\/US-MI", | ||
"@type": "Province", | ||
"code": "US-MI", | ||
"name": "Minnesota" | ||
}, | ||
{ | ||
"@id": "\/api\/v2\/shop\/provinces\/US-WY", | ||
"@type": "Province", | ||
"code": "US-WY", | ||
"name": "Wyoming" | ||
} | ||
] | ||
}, | ||
{ | ||
"@id": "\/api\/v2\/shop\/countries\/FR", | ||
"@type": "Country", | ||
"code": "FR", | ||
"name": "France", | ||
"provinces": [] | ||
} | ||
], | ||
"hydra:totalItems": 2 | ||
} |
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