2
2
3
3
namespace spec \Diglin \Sylius \ApiClient ;
4
4
5
- use Diglin \Sylius \ApiClient \Api \ ChannelsApiInterface ;
5
+ use Diglin \Sylius \ApiClient \Api ;
6
6
use Diglin \Sylius \ApiClient \Security \Authentication ;
7
7
use Diglin \Sylius \ApiClient \SyliusClient ;
8
8
use Diglin \Sylius \ApiClient \SyliusClientInterface ;
@@ -12,11 +12,59 @@ class SyliusClientSpec extends ObjectBehavior
12
12
{
13
13
public function let (
14
14
Authentication $ authentication ,
15
- ChannelsApiInterface $ channelApi
15
+ Api \CartsApiInterface $ cartsApi ,
16
+ Api \ChannelsApiInterface $ channelsApi ,
17
+ Api \CountriesApiInterface $ countriesApi ,
18
+ Api \CurrenciesApiInterface $ currenciesApi ,
19
+ Api \CustomersApiInterface $ customersApi ,
20
+ Api \ExchangeRatesApiInterface $ exchangeRatesApi ,
21
+ Api \LocalesApiInterface $ localesApi ,
22
+ Api \OrdersApiInterface $ ordersApi ,
23
+ Api \PaymentMethodsApiInterface $ paymentMethodApi ,
24
+ Api \PaymentsApiInterface $ paymentsApi ,
25
+ Api \ProductsApiInterface $ productsApi ,
26
+ Api \ProductAttributesApiInterface $ productAttributesApi ,
27
+ Api \ProductAssociationTypesApiInterface $ productAssociationTypesApi ,
28
+ Api \ProductOptionsApiInterface $ productOptionsApi ,
29
+ Api \ProductReviewsApiInterface $ productReviewsApi ,
30
+ Api \ProductVariantsApiInterface $ productVariantsApi ,
31
+ Api \PromotionsApiInterface $ promotionsApi ,
32
+ Api \PromotionCouponsApiInterface $ promotionCouponsApi ,
33
+ Api \ShipmentsApiInterface $ shipmentsApi ,
34
+ Api \ShippingCategoriesApiInterface $ shippingCategoriesApi ,
35
+ Api \TaxCategoriesApiInterface $ taxCategoriesApi ,
36
+ Api \TaxRatesApiInterface $ taxRatesApi ,
37
+ Api \TaxonsApiInterface $ taxonsApi ,
38
+ Api \UsersApiInterface $ usersApi ,
39
+ Api \ZonesApiInterface $ zonesApi
16
40
) {
17
41
$ this ->beConstructedWith (
18
42
$ authentication ,
19
- $ channelApi
43
+ $ cartsApi ,
44
+ $ channelsApi ,
45
+ $ countriesApi ,
46
+ $ currenciesApi ,
47
+ $ customersApi ,
48
+ $ exchangeRatesApi ,
49
+ $ localesApi ,
50
+ $ ordersApi ,
51
+ $ paymentMethodApi ,
52
+ $ paymentsApi ,
53
+ $ productsApi ,
54
+ $ productAttributesApi ,
55
+ $ productAssociationTypesApi ,
56
+ $ productOptionsApi ,
57
+ $ productReviewsApi ,
58
+ $ productVariantsApi ,
59
+ $ promotionsApi ,
60
+ $ promotionCouponsApi ,
61
+ $ shipmentsApi ,
62
+ $ shippingCategoriesApi ,
63
+ $ taxCategoriesApi ,
64
+ $ taxRatesApi ,
65
+ $ taxonsApi ,
66
+ $ usersApi ,
67
+ $ zonesApi
20
68
);
21
69
}
22
70
@@ -40,8 +88,128 @@ public function it_gets_refresh_token($authentication)
40
88
$ this ->getRefreshToken ()->shouldReturn ('bar ' );
41
89
}
42
90
43
- public function it_gets_channel_api ( $ channelApi )
91
+ public function it_gets_cart_api ( )
44
92
{
45
- $ this ->getChannelsApi ()->shouldReturn ($ channelApi );
93
+ $ this ->getCartsApi ()->shouldReturnAnInstanceOf (Api \CartsApiInterface::class);
94
+ }
95
+
96
+ public function it_gets_channel_api ()
97
+ {
98
+ $ this ->getChannelsApi ()->shouldReturnAnInstanceOf (Api \ChannelsApiInterface::class);
99
+ }
100
+
101
+ public function it_gets_country_api ()
102
+ {
103
+ $ this ->getCountriesApi ()->shouldReturnAnInstanceOf (Api \CountriesApiInterface::class);
104
+ }
105
+
106
+ public function if_gets_currencies_api ()
107
+ {
108
+ $ this ->getCurrenciesApi ()->shouldReturnAnInstanceOf (Api \CurrenciesApiInterface::class);
109
+ }
110
+
111
+ public function if_gets_customers_api ()
112
+ {
113
+ $ this ->getCustomersApi ()->shouldReturnAnInstanceOf (Api \CustomersApiInterface::class);
114
+ }
115
+
116
+ public function if_gets_exchangeRates_api ()
117
+ {
118
+ $ this ->getExchangeRatesApi ()->shouldReturnAnInstanceOf (Api \ExchangeRatesApiInterface::class);
119
+ }
120
+
121
+ public function if_gets_locales_api ()
122
+ {
123
+ $ this ->getLocalesApi ()->shouldReturnAnInstanceOf (Api \LocalesApiInterface::class);
124
+ }
125
+
126
+ public function if_gets_orders_api ()
127
+ {
128
+ $ this ->getOrdersApi ()->shouldReturnAnInstanceOf (Api \OrdersApiInterface::class);
129
+ }
130
+
131
+ public function if_gets_paymentMethods_api ()
132
+ {
133
+ $ this ->getPaymentMethodsApi ()->shouldReturnAnInstanceOf (Api \PaymentMethodsApiInterface::class);
134
+ }
135
+
136
+ public function if_gets_payments_api ()
137
+ {
138
+ $ this ->getPaymentsApi ()->shouldReturnAnInstanceOf (Api \PaymentsApiInterface::class);
139
+ }
140
+
141
+ public function if_gets_products_api ()
142
+ {
143
+ $ this ->getProductsApi ()->shouldReturnAnInstanceOf (Api \ProductsApiInterface::class);
144
+ }
145
+
146
+ public function if_gets_productAttributes_api ()
147
+ {
148
+ $ this ->getProductAttributesApi ()->shouldReturnAnInstanceOf (Api \ProductAttributesApiInterface::class);
149
+ }
150
+
151
+ public function if_gets_productAssociationTypes_api ()
152
+ {
153
+ $ this ->getProductAssociationTypesApi ()->shouldReturnAnInstanceOf (Api \ProductAssociationTypesApiInterface::class);
154
+ }
155
+
156
+ public function if_gets_productOptions_api ()
157
+ {
158
+ $ this ->getProductOptionsApi ()->shouldReturnAnInstanceOf (Api \ProductOptionsApiInterface::class);
159
+ }
160
+
161
+ public function if_gets_productReviews_api ()
162
+ {
163
+ $ this ->getProductReviewsApi ()->shouldReturnAnInstanceOf (Api \ProductReviewsApiInterface::class);
164
+ }
165
+
166
+ public function if_gets_productVariants_api ()
167
+ {
168
+ $ this ->getProductVariantsApi ()->shouldReturnAnInstanceOf (Api \ProductVariantsApiInterface::class);
169
+ }
170
+
171
+ public function if_gets_promotions_api ()
172
+ {
173
+ $ this ->getPromotionsApi ()->shouldReturnAnInstanceOf (Api \PromotionsApiInterface::class);
174
+ }
175
+
176
+ public function if_gets_promotionCoupons_api ()
177
+ {
178
+ $ this ->getPromotionCouponsApi ()->shouldReturnAnInstanceOf (Api \PromotionCouponsApiInterface::class);
179
+ }
180
+
181
+ public function if_gets_shipments_api ()
182
+ {
183
+ $ this ->getShipmentsApi ()->shouldReturnAnInstanceOf (Api \ShipmentsApiInterface::class);
184
+ }
185
+
186
+ public function if_gets_shippingCategories_api ()
187
+ {
188
+ $ this ->getShippingCategoriesApi ()->shouldReturnAnInstanceOf (Api \ShippingCategoriesApiInterface::class);
189
+ }
190
+
191
+ public function if_gets_taxCategories_api ()
192
+ {
193
+ $ this ->getTaxCategoriesApi ()->shouldReturnAnInstanceOf (Api \TaxCategoriesApiInterface::class);
194
+ }
195
+
196
+ public function if_gets_taxRates_api ()
197
+ {
198
+ $ this ->getTaxRatesApi ()->shouldReturnAnInstanceOf (Api \TaxRatesApiInterface::class);
199
+ }
200
+
201
+ public function if_gets_taxons_api ()
202
+ {
203
+ $ this ->getTaxonsApi ()->shouldReturnAnInstanceOf (Api \TaxonsApiInterface::class);
204
+ }
205
+
206
+ public function if_gets_users_api ()
207
+ {
208
+ $ this ->getUsersApi ()->shouldReturnAnInstanceOf (Api \UsersApiInterface::class);
209
+ }
210
+
211
+ public function if_gets_zones_api ()
212
+ {
213
+ $ this ->getZonesApi ()->shouldReturnAnInstanceOf (Api \ZonesApiInterface::class);
46
214
}
47
215
}
0 commit comments