From a136359c613306de61dae74d8807b19f4a49f97f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Chru=C5=9Bciel?= Date: Tue, 23 Jul 2019 16:21:57 +0200 Subject: [PATCH] [Maintenance] EOT to JSON rename --- .../AddressBookCreateAddressApiTest.php | 16 ++-- .../AddressBookUpdateAddressApiTest.php | 12 +-- .../Cart/CartAddCouponShopApiTest.php | 20 ++--- .../Cart/CartChangeItemQuantityApiTest.php | 16 ++-- .../Cart/CartPutItemToCartApiTest.php | 84 +++++++++---------- .../Cart/CartPutItemsToCartApiTest.php | 16 ++-- .../Controller/Cart/CartSummarizeApiTest.php | 12 +-- .../Checkout/CheckoutAddressApiTest.php | 24 +++--- .../CheckoutChoosePaymentMethodApiTest.php | 4 +- .../CheckoutChooseShippingMethodApiTest.php | 4 +- .../Checkout/CheckoutCompleteOrderApiTest.php | 16 ++-- .../Checkout/CheckoutSummarizeApiTest.php | 24 +++--- .../Customer/CustomerLoginApiTest.php | 12 +-- .../Customer/CustomerRegisterApiTest.php | 16 ++-- ...CustomerResendVerificationTokenApiTest.php | 4 +- .../Customer/CustomerResetPasswordApiTest.php | 4 +- .../CustomerUpdateCustomerApiTest.php | 12 +-- .../Customer/CustomerVerifyApiTest.php | 4 +- .../LoggedInCustomerDetailsActionTest.php | 4 +- .../Product/ProductAddReviewByCodeApiTest.php | 16 ++-- .../Product/ProductAddReviewBySlugApiTest.php | 16 ++-- tests/Controller/Utils/ShopUserLoginTrait.php | 4 +- 22 files changed, 170 insertions(+), 170 deletions(-) diff --git a/tests/Controller/AddressBook/AddressBookCreateAddressApiTest.php b/tests/Controller/AddressBook/AddressBookCreateAddressApiTest.php index 3269f614f..705e7f9fb 100644 --- a/tests/Controller/AddressBook/AddressBookCreateAddressApiTest.php +++ b/tests/Controller/AddressBook/AddressBookCreateAddressApiTest.php @@ -26,7 +26,7 @@ public function it_allows_user_to_add_new_address_to_address_book(): void $this->logInUser('oliver@queen.com', '123password'); $data = -<<createAddress($data); $this->assertResponse($response, 'address_book/add_address_response', Response::HTTP_CREATED); @@ -65,7 +65,7 @@ public function it_does_not_allow_user_to_add_new_address_to_address_book_withou $this->logInUser('oliver@queen.com', '123password'); $data = -<<createAddress($data); $this->assertResponse($response, 'address_book/validation_create_address_book_response', Response::HTTP_BAD_REQUEST); @@ -90,7 +90,7 @@ public function it_does_not_allow_user_to_add_new_address_to_address_book_withou $this->logInUser('oliver@queen.com', '123password'); $data = -<<createAddress($data); $this->assertResponse($response, 'address_book/validation_create_address_book_with_wrong_country_response', Response::HTTP_BAD_REQUEST); @@ -114,7 +114,7 @@ public function it_does_not_allow_user_to_add_new_address_to_address_book_withou $this->logInUser('oliver@queen.com', '123password'); $data = -<<createAddress($data); $this->assertResponse($response, 'address_book/validation_create_address_book_with_wrong_province_response', Response::HTTP_INTERNAL_SERVER_ERROR); diff --git a/tests/Controller/AddressBook/AddressBookUpdateAddressApiTest.php b/tests/Controller/AddressBook/AddressBookUpdateAddressApiTest.php index 433667bca..487c73ce8 100644 --- a/tests/Controller/AddressBook/AddressBookUpdateAddressApiTest.php +++ b/tests/Controller/AddressBook/AddressBookUpdateAddressApiTest.php @@ -29,7 +29,7 @@ public function it_updates_address_in_address_book(): void $address = $addressRepository->findOneBy(['street' => 'Kupreska']); $data = -<<updateAddress((string) $address->getId(), $data); $this->assertResponse($response, 'address_book/update_address', Response::HTTP_OK); @@ -71,7 +71,7 @@ public function it_does_not_allow_to_update_address_if_country_or_province_code_ $address = $addressRepository->findOneBy(['street' => 'Kupreska']); $data = -<<updateAddress((string) $address->getId(), $data); $this->assertResponseCode($response, Response::HTTP_BAD_REQUEST); @@ -103,7 +103,7 @@ public function it_does_not_allow_to_update_address_without_passing_required_dat $address = $addressRepository->findOneBy(['street' => 'Kupreska']); $data = -<<updateAddress((string) $address->getId(), $data); $this->assertResponseCode($response, Response::HTTP_BAD_REQUEST); diff --git a/tests/Controller/Cart/CartAddCouponShopApiTest.php b/tests/Controller/Cart/CartAddCouponShopApiTest.php index e09a187da..2403c3ee2 100644 --- a/tests/Controller/Cart/CartAddCouponShopApiTest.php +++ b/tests/Controller/Cart/CartAddCouponShopApiTest.php @@ -27,11 +27,11 @@ public function it_allows_to_add_promotion_coupon_to_the_cart(): void $bus->dispatch(new PutSimpleItemToCart($token, 'LOGAN_MUG_CODE', 5)); $data = -<<client->request('PUT', sprintf('/shop-api/carts/%s/coupon', $token), [], [], self::CONTENT_TYPE_HEADER, $data); @@ -69,11 +69,11 @@ public function it_does_not_allow_to_add_promotion_code_if_cart_does_not_exists( $this->loadFixturesFromFiles(['channel.yml', 'shop.yml']); $data = -<<client->request('PUT', '/shop-api/carts/WRONGTOKEN/coupon', [], [], self::CONTENT_TYPE_HEADER, $data); @@ -97,11 +97,11 @@ public function it_does_not_allow_to_add_promotion_code_if_promotion_code_does_n $bus->dispatch(new PutSimpleItemToCart($token, 'LOGAN_MUG_CODE', 5)); $data = -<<client->request('PUT', sprintf('/shop-api/carts/%s/coupon', $token), [], [], self::CONTENT_TYPE_HEADER, $data); @@ -125,11 +125,11 @@ public function it_does_not_allow_to_add_promotion_code_if_code_is_invalid(): vo $bus->dispatch(new PutSimpleItemToCart($token, 'LOGAN_MUG_CODE', 5)); $data = -<<client->request('PUT', sprintf('/shop-api/carts/%s/coupon', $token), [], [], self::CONTENT_TYPE_HEADER, $data); @@ -153,11 +153,11 @@ public function it_does_not_allow_to_add_promotion_code_if_related_promotion_is_ $bus->dispatch(new PutSimpleItemToCart($token, 'LOGAN_MUG_CODE', 5)); $data = -<<client->request('PUT', sprintf('/shop-api/carts/%s/coupon', $token), [], [], self::CONTENT_TYPE_HEADER, $data); diff --git a/tests/Controller/Cart/CartChangeItemQuantityApiTest.php b/tests/Controller/Cart/CartChangeItemQuantityApiTest.php index 7c9afefce..e42e85463 100644 --- a/tests/Controller/Cart/CartChangeItemQuantityApiTest.php +++ b/tests/Controller/Cart/CartChangeItemQuantityApiTest.php @@ -22,11 +22,11 @@ public function it_does_not_allow_to_change_quantity_if_cart_does_not_exists(): $this->loadFixturesFromFiles(['channel.yml', 'shop.yml']); $data = -<<client->request('PUT', '/shop-api/carts/SDAOSLEFNWU35H3QLI5325/items/1', [], [], self::CONTENT_TYPE_HEADER, $data); $response = $this->client->getResponse(); @@ -48,11 +48,11 @@ public function it_changes_item_quantity(): void $bus->dispatch(new PutSimpleItemToCart($token, 'LOGAN_MUG_CODE', 3)); $data = -<<client->request('PUT', '/shop-api/carts/SDAOSLEFNWU35H3QLI5325/items/' . $this->getFirstOrderItemId($token), [], [], self::CONTENT_TYPE_HEADER, $data); $response = $this->client->getResponse(); @@ -74,11 +74,11 @@ public function it_does_not_allow_to_set_quantity_lower_than_one(): void $bus->dispatch(new PutSimpleItemToCart($token, 'LOGAN_MUG_CODE', 3)); $data = -<<client->request('PUT', '/shop-api/carts/SDAOSLEFNWU35H3QLI5325/items/' . $this->getFirstOrderItemId($token), [], [], self::CONTENT_TYPE_HEADER, $data); $response = $this->client->getResponse(); @@ -119,11 +119,11 @@ public function it_does_not_allow_to_change_quantity_if_cart_item_does_not_exist $bus->dispatch(new PickupCart($token, 'WEB_GB')); $data = -<<client->request('PUT', '/shop-api/carts/SDAOSLEFNWU35H3QLI5325/items/420', [], [], self::CONTENT_TYPE_HEADER, $data); $response = $this->client->getResponse(); diff --git a/tests/Controller/Cart/CartPutItemToCartApiTest.php b/tests/Controller/Cart/CartPutItemToCartApiTest.php index a3c6ce4df..16949ff31 100644 --- a/tests/Controller/Cart/CartPutItemToCartApiTest.php +++ b/tests/Controller/Cart/CartPutItemToCartApiTest.php @@ -32,12 +32,12 @@ public function it_adds_a_product_to_the_cart(): void $bus->dispatch(new PickupCart($token, 'WEB_GB')); $data = -<<client->request('POST', sprintf('/shop-api/carts/%s/items', $token), [], [], self::CONTENT_TYPE_HEADER, $data); $response = $this->client->getResponse(); @@ -58,12 +58,12 @@ public function it_increases_quantity_of_existing_item_if_the_same_product_is_ad $bus->dispatch(new PickupCart($token, 'WEB_GB')); $data = -<<client->request('POST', sprintf('/shop-api/carts/%s/items', $token), [], [], self::CONTENT_TYPE_HEADER, $data); $this->client->request('POST', sprintf('/shop-api/carts/%s/items', $token), [], [], self::CONTENT_TYPE_HEADER, $data); $response = $this->client->getResponse(); @@ -85,12 +85,12 @@ public function it_validates_if_product_is_simple_during_add_simple_product(): v $bus->dispatch(new PickupCart($token, 'WEB_GB')); $data = -<<client->request('POST', sprintf('/shop-api/carts/%s/items', $token), [], [], self::CONTENT_TYPE_HEADER, $data); $response = $this->client->getResponse(); @@ -111,12 +111,12 @@ public function it_validates_if_quantity_is_larger_than_0_during_add_simple_prod $bus->dispatch(new PickupCart($token, 'WEB_GB')); $data = -<<client->request('POST', sprintf('/shop-api/carts/%s/items', $token), [], [], self::CONTENT_TYPE_HEADER, $data); $response = $this->client->getResponse(); @@ -137,12 +137,12 @@ public function it_converts_quantity_as_an_integer_and_adds_simple_product(): vo $bus->dispatch(new PickupCart($token, 'WEB_GB')); $data = -<<client->request('POST', sprintf('/shop-api/carts/%s/items', $token), [], [], self::CONTENT_TYPE_HEADER, $data); $response = $this->client->getResponse(); @@ -163,11 +163,11 @@ public function it_validates_if_product_code_is_defined_during_add_simple_produc $bus->dispatch(new PickupCart($token, 'WEB_GB')); $data = -<<client->request('POST', sprintf('/shop-api/carts/%s/items', $token), [], [], self::CONTENT_TYPE_HEADER, $data); $response = $this->client->getResponse(); @@ -188,12 +188,12 @@ public function it_validates_if_product_exists_during_add_simple_product(): void $bus->dispatch(new PickupCart($token, 'WEB_GB')); $data = -<<client->request('POST', sprintf('/shop-api/carts/%s/items', $token), [], [], self::CONTENT_TYPE_HEADER, $data); $response = $this->client->getResponse(); @@ -210,12 +210,12 @@ public function it_does_not_allow_to_add_product_if_cart_does_not_exists_during_ $token = 'SDAOSLEFNWU35H3QLI5325'; $data = -<<client->request('POST', sprintf('/shop-api/carts/%s/items', $token), [], [], self::CONTENT_TYPE_HEADER, $data); $response = $this->client->getResponse(); @@ -264,12 +264,12 @@ public function it_does_not_allow_to_add_product_if_order_has_been_placed(): voi $bus->dispatch(new CompleteOrder($token, 'sylius@example.com')); $data = -<<client->request('POST', sprintf('/shop-api/carts/%s/items', $order->getTokenValue()), [], [], self::CONTENT_TYPE_HEADER, $data); $response = $this->client->getResponse(); @@ -290,13 +290,13 @@ public function it_adds_a_product_variant_to_the_cart(): void $bus->dispatch(new PickupCart($token, 'WEB_GB')); $data = -<<client->request('POST', sprintf('/shop-api/carts/%s/items', $token), [], [], self::CONTENT_TYPE_HEADER, $data); $response = $this->client->getResponse(); @@ -317,13 +317,13 @@ public function it_increases_quantity_of_existing_item_if_the_same_variant_is_ad $bus->dispatch(new PickupCart($token, 'WEB_GB')); $data = -<<client->request('POST', sprintf('/shop-api/carts/%s/items', $token), [], [], self::CONTENT_TYPE_HEADER, $data); $this->client->request('POST', sprintf('/shop-api/carts/%s/items', $token), [], [], self::CONTENT_TYPE_HEADER, $data); $response = $this->client->getResponse(); @@ -345,13 +345,13 @@ public function it_validates_if_quantity_is_larger_than_0_during_add_variant_bas $bus->dispatch(new PickupCart($token, 'WEB_GB')); $data = -<<client->request('POST', sprintf('/shop-api/carts/%s/items', $token), [], [], self::CONTENT_TYPE_HEADER, $data); $response = $this->client->getResponse(); @@ -372,13 +372,13 @@ public function it_converts_quantity_as_an_integer_and_adds_variant_based_config $bus->dispatch(new PickupCart($token, 'WEB_GB')); $data = -<<client->request('POST', sprintf('/shop-api/carts/%s/items', $token), [], [], self::CONTENT_TYPE_HEADER, $data); $response = $this->client->getResponse(); @@ -399,12 +399,12 @@ public function it_validates_if_product_code_is_defined_during_add_variant_based $bus->dispatch(new PickupCart($token, 'WEB_GB')); $data = -<<client->request('POST', sprintf('/shop-api/carts/%s/items', $token), [], [], self::CONTENT_TYPE_HEADER, $data); $response = $this->client->getResponse(); @@ -425,13 +425,13 @@ public function it_validates_if_product_exists_during_add_variant_based_configur $bus->dispatch(new PickupCart($token, 'WEB_GB')); $data = -<<client->request('POST', sprintf('/shop-api/carts/%s/items', $token), [], [], self::CONTENT_TYPE_HEADER, $data); $response = $this->client->getResponse(); @@ -452,13 +452,13 @@ public function it_validates_if_product_is_configurable_during_add_variant_based $bus->dispatch(new PickupCart($token, 'WEB_GB')); $data = -<<client->request('POST', sprintf('/shop-api/carts/%s/items', $token), [], [], self::CONTENT_TYPE_HEADER, $data); $response = $this->client->getResponse(); @@ -479,13 +479,13 @@ public function it_validates_if_product_variant_exist_during_add_variant_based_c $bus->dispatch(new PickupCart($token, 'WEB_GB')); $data = -<<client->request('POST', sprintf('/shop-api/carts/%s/items', $token), [], [], self::CONTENT_TYPE_HEADER, $data); $response = $this->client->getResponse(); @@ -503,7 +503,7 @@ public function it_throws_an_exception_if_product_variant_has_not_been_found(): $bus->dispatch(new PickupCart($token, 'WEB_GB')); $data = -<<client->request('POST', '/shop-api/carts/SDAOSLEFNWU35H3QLI5325/items', [], [], self::CONTENT_TYPE_HEADER, $data); $response = $this->client->getResponse(); @@ -532,7 +532,7 @@ public function it_adds_a_product_variant_based_on_options_to_the_cart(): void $bus->dispatch(new PickupCart($token, 'WEB_GB')); $data = -<<client->request('POST', '/shop-api/carts/SDAOSLEFNWU35H3QLI5325/items', [], [], self::CONTENT_TYPE_HEADER, $data); $response = $this->client->getResponse(); @@ -562,7 +562,7 @@ public function it_increases_quantity_of_existing_item_while_adding_the_same_pro $bus->dispatch(new PickupCart($token, 'WEB_GB')); $data = -<<client->request('POST', sprintf('/shop-api/carts/%s/items', $token), [], [], self::CONTENT_TYPE_HEADER, $data); $this->client->request('POST', sprintf('/shop-api/carts/%s/items', $token), [], [], self::CONTENT_TYPE_HEADER, $data); $response = $this->client->getResponse(); @@ -587,12 +587,12 @@ public function it_creates_new_cart_when_token_is_not_passed(): void $this->loadFixturesFromFiles(['shop.yml']); $data = -<<client->request('POST', '/shop-api/carts/new/items', [], [], self::CONTENT_TYPE_HEADER, $data); $response = $this->client->getResponse(); diff --git a/tests/Controller/Cart/CartPutItemsToCartApiTest.php b/tests/Controller/Cart/CartPutItemsToCartApiTest.php index d2d16eec6..0ea7b4148 100644 --- a/tests/Controller/Cart/CartPutItemsToCartApiTest.php +++ b/tests/Controller/Cart/CartPutItemsToCartApiTest.php @@ -25,7 +25,7 @@ public function it_adds_a_product_to_the_cart(): void $bus->dispatch(new PickupCart($token, 'WEB_GB')); $data = -<<client->request('POST', sprintf('/shop-api/carts/%s/multiple-items', $token), [], [], self::CONTENT_TYPE_HEADER, $data); $response = $this->client->getResponse(); @@ -68,7 +68,7 @@ public function it_does_nothing_if_any_of_requested_products_is_not_valid(): voi $bus->dispatch(new PickupCart($token, 'WEB_GB')); $data = -<<client->request('POST', sprintf('/shop-api/carts/%s/multiple-items', $token), [], [], self::CONTENT_TYPE_HEADER, $data); $this->client->request('GET', sprintf('/shop-api/carts/%s', $token), [], [], self::CONTENT_TYPE_HEADER, $data); $response = $this->client->getResponse(); @@ -111,7 +111,7 @@ public function it_shows_validation_error_for_proper_product(): void $bus->dispatch(new PickupCart($token, 'WEB_GB')); $data = -<<client->request('POST', sprintf('/shop-api/carts/%s/multiple-items', $token), [], [], self::CONTENT_TYPE_HEADER, $data); $response = $this->client->getResponse(); @@ -146,7 +146,7 @@ public function it_creates_new_cart_when_token_is_not_passed(): void $this->loadFixturesFromFiles(['shop.yml']); $data = -<<client->request('POST', '/shop-api/carts/new/multiple-items', [], [], self::CONTENT_TYPE_HEADER, $data); $response = $this->client->getResponse(); diff --git a/tests/Controller/Cart/CartSummarizeApiTest.php b/tests/Controller/Cart/CartSummarizeApiTest.php index 7beacaa20..774663279 100644 --- a/tests/Controller/Cart/CartSummarizeApiTest.php +++ b/tests/Controller/Cart/CartSummarizeApiTest.php @@ -123,7 +123,7 @@ public function it_shows_summary_of_a_cart_filled_with_a_product_with_variant(): $bus->dispatch(new PickupCart($token, 'WEB_GB')); $variantWithOptions = -<<client->request('POST', sprintf('/shop-api/carts/%s/items', $token), [], [], self::CONTENT_TYPE_HEADER, $regularVariant); $this->client->request('POST', sprintf('/shop-api/carts/%s/items', $token), [], [], self::CONTENT_TYPE_HEADER, $variantWithOptions); @@ -165,7 +165,7 @@ public function it_shows_summary_of_a_cart_filled_with_a_product_with_variant_in $bus->dispatch(new PickupCart($token, 'WEB_DE')); $variantWithOptions = -<<client->request('POST', sprintf('/shop-api/carts/%s/items', $token), [], [], self::CONTENT_TYPE_HEADER, $variantWithOptions); diff --git a/tests/Controller/Checkout/CheckoutAddressApiTest.php b/tests/Controller/Checkout/CheckoutAddressApiTest.php index 0e0a94b30..0e386657a 100644 --- a/tests/Controller/Checkout/CheckoutAddressApiTest.php +++ b/tests/Controller/Checkout/CheckoutAddressApiTest.php @@ -21,7 +21,7 @@ public function it_does_not_allow_to_address_non_existing_order(): void $this->loadFixturesFromFiles(['shop.yml', 'country.yml']); $data = -<<address('WRONGTOKEN', $data); $this->assertResponse($response, 'cart/validation_cart_not_exists_response', Response::HTTP_BAD_REQUEST); @@ -54,7 +54,7 @@ public function it_allows_to_address_order_with_the_same_shipping_and_billing_ad $bus->dispatch(new PutSimpleItemToCart($token, 'LOGAN_MUG_CODE', 5)); $data = -<<address($token, $data); $this->assertResponseCode($response, Response::HTTP_NO_CONTENT); @@ -87,7 +87,7 @@ public function it_allows_to_address_order_with_the_same_shipping_and_billing_ad $bus->dispatch(new PutSimpleItemToCart($token, 'LOGAN_MUG_CODE', 5)); $data = -<<address($token, $data); $this->assertResponseCode($response, Response::HTTP_NO_CONTENT); @@ -119,7 +119,7 @@ public function it_allows_to_address_order_with_different_shipping_and_billing_a $bus->dispatch(new PutSimpleItemToCart($token, 'LOGAN_MUG_CODE', 5)); $data = -<<address($token, $data); $this->assertResponseCode($response, Response::HTTP_NO_CONTENT); @@ -164,7 +164,7 @@ public function changing_address_does_not_fill_up_database() $bus->dispatch(new PutSimpleItemToCart($token, 'LOGAN_MUG_CODE', 5)); $data = -<<address($token, $data); $firstAddressCount = count($addressRepository->findAll()); $data = -<<address($token, $data); $this->assertResponseCode($response, Response::HTTP_NO_CONTENT); diff --git a/tests/Controller/Checkout/CheckoutChoosePaymentMethodApiTest.php b/tests/Controller/Checkout/CheckoutChoosePaymentMethodApiTest.php index 2fa2f79d2..d2a526297 100644 --- a/tests/Controller/Checkout/CheckoutChoosePaymentMethodApiTest.php +++ b/tests/Controller/Checkout/CheckoutChoosePaymentMethodApiTest.php @@ -51,11 +51,11 @@ public function it_allows_to_choose_payment_method(): void $bus->dispatch(new ChooseShippingMethod($token, 0, 'DHL')); $data = -<<client->request( 'PUT', diff --git a/tests/Controller/Checkout/CheckoutChooseShippingMethodApiTest.php b/tests/Controller/Checkout/CheckoutChooseShippingMethodApiTest.php index 1aaeae348..ae0e95f23 100644 --- a/tests/Controller/Checkout/CheckoutChooseShippingMethodApiTest.php +++ b/tests/Controller/Checkout/CheckoutChooseShippingMethodApiTest.php @@ -49,11 +49,11 @@ public function it_allows_to_choose_shipping_method(): void )); $data = -<<client->request( 'PUT', diff --git a/tests/Controller/Checkout/CheckoutCompleteOrderApiTest.php b/tests/Controller/Checkout/CheckoutCompleteOrderApiTest.php index 7342d28bc..135bbbc9d 100644 --- a/tests/Controller/Checkout/CheckoutCompleteOrderApiTest.php +++ b/tests/Controller/Checkout/CheckoutCompleteOrderApiTest.php @@ -56,11 +56,11 @@ public function it_allows_to_complete_checkout(): void $bus->dispatch(new ChoosePaymentMethod($token, 0, 'PBC')); $data = -<<complete($token, $data); $this->assertResponseCode($response, Response::HTTP_NO_CONTENT); @@ -103,12 +103,12 @@ public function it_allows_to_complete_checkout_with_notes(): void $bus->dispatch(new ChoosePaymentMethod($token, 0, 'PBC')); $data = -<<complete($token, $data); $this->assertResponseCode($response, Response::HTTP_NO_CONTENT); @@ -193,12 +193,12 @@ public function it_disallows_users_to_complete_checkout_for_user_with_account_wi $bus->dispatch(new ChoosePaymentMethod($token, 0, 'PBC')); $data = -<<complete($token, $data); $this->assertResponseCode($response, Response::HTTP_UNAUTHORIZED); @@ -243,11 +243,11 @@ public function it_disallows_users_to_complete_checkout_for_someone_else(): void $this->logInUser('oliver@queen.com', '123password'); $data = -<<complete($token, $data); $this->assertResponseCode($response, Response::HTTP_UNAUTHORIZED); diff --git a/tests/Controller/Checkout/CheckoutSummarizeApiTest.php b/tests/Controller/Checkout/CheckoutSummarizeApiTest.php index b32bb4859..94d845ebd 100644 --- a/tests/Controller/Checkout/CheckoutSummarizeApiTest.php +++ b/tests/Controller/Checkout/CheckoutSummarizeApiTest.php @@ -32,7 +32,7 @@ public function it_shows_an_order_with_same_shipping_and_billing_address_with_pr $bus->dispatch(new PutSimpleItemToCart($token, 'LOGAN_MUG_CODE', 5)); $data = -<<client->request('PUT', sprintf('/shop-api/checkout/%s/address', $token), [], [], static::CONTENT_TYPE_HEADER, $data); @@ -69,7 +69,7 @@ public function it_shows_an_order_with_different_shipping_and_billing_address_wi $bus->dispatch(new PutSimpleItemToCart($token, 'LOGAN_MUG_CODE', 5)); $data = -<<client->request('PUT', sprintf('/shop-api/checkout/%s/address', $token), [], [], static::CONTENT_TYPE_HEADER, $data); @@ -138,11 +138,11 @@ public function it_shows_an_order_with_chosen_shipment(): void )); $data = -<<client->request('PUT', sprintf('/shop-api/checkout/%s/shipping/0', $token), [], [], static::CONTENT_TYPE_HEADER, $data); @@ -186,11 +186,11 @@ public function it_modifies_shipping_cost_when_changing_item_quantity(): void )); $data = -<<client->request('PUT', sprintf('/shop-api/checkout/%s/shipping/0', $token), [], [], static::CONTENT_TYPE_HEADER, $data); @@ -206,11 +206,11 @@ public function it_modifies_shipping_cost_when_changing_item_quantity(): void $orderItem = $order->getItems()->first(); $data = -<<client->request('PUT', sprintf('/shop-api/carts/%s/items/%d', $token, $orderItem->getId()), [], [], static::CONTENT_TYPE_HEADER, $data); $response = $this->client->getResponse(); @@ -254,11 +254,11 @@ public function it_shows_an_order_with_chosen_payment(): void $bus->dispatch(new ChooseShippingMethod($token, 0, 'DHL')); $data = -<<client->request('PUT', sprintf('/shop-api/checkout/%s/payment/0', $token), [], [], static::CONTENT_TYPE_HEADER, $data); diff --git a/tests/Controller/Customer/CustomerLoginApiTest.php b/tests/Controller/Customer/CustomerLoginApiTest.php index 07fde3d86..6ad2810f5 100644 --- a/tests/Controller/Customer/CustomerLoginApiTest.php +++ b/tests/Controller/Customer/CustomerLoginApiTest.php @@ -21,12 +21,12 @@ public function it_allows_to_log_customer_in(): void $this->loadFixturesFromFiles(['customer.yml']); $data = -<<client->request('POST', '/shop-api/login_check', [], [], self::CONTENT_TYPE_HEADER, $data); @@ -40,7 +40,7 @@ public function it_allows_to_log_customer_in(): void public function it_requires_to_verify_email_address_for_newly_created_customers(): void { $data = -<<client->request('POST', '/shop-api/register', [], [], self::CONTENT_TYPE_HEADER, $data); $data = -<<client->request('POST', '/shop-api/login_check', [], [], self::CONTENT_TYPE_HEADER, $data); diff --git a/tests/Controller/Customer/CustomerRegisterApiTest.php b/tests/Controller/Customer/CustomerRegisterApiTest.php index 4260837bc..1bbf63121 100644 --- a/tests/Controller/Customer/CustomerRegisterApiTest.php +++ b/tests/Controller/Customer/CustomerRegisterApiTest.php @@ -24,14 +24,14 @@ public function it_allows_to_register_in_shop_and_sends_a_verification_email_if_ $this->loadFixturesFromFiles(['channel.yml']); $data = -<<client->request('POST', '/shop-api/register', [], [], self::CONTENT_TYPE_HEADER, $data); @@ -58,14 +58,14 @@ public function it_allows_to_register_in_shop_and_automatically_enables_user_if_ $this->loadFixturesFromFiles(['channel.yml']); $data = -<<client->request('POST', 'http://web-de.com/shop-api/register', [], [], self::CONTENT_TYPE_HEADER, $data); @@ -99,14 +99,14 @@ public function it_does_not_allow_to_register_in_shop_if_email_is_already_taken( $this->loadFixturesFromFiles(['customer.yml', 'channel.yml']); $data = -<<client->request('POST', '/shop-api/register', [], [], self::CONTENT_TYPE_HEADER, $data); @@ -123,13 +123,13 @@ public function it_does_not_allow_to_register_in_shop_without_passing_required_d $this->loadFixturesFromFiles(['channel.yml']); $data = -<<client->request('POST', '/shop-api/register', [], [], self::CONTENT_TYPE_HEADER, $data); diff --git a/tests/Controller/Customer/CustomerResendVerificationTokenApiTest.php b/tests/Controller/Customer/CustomerResendVerificationTokenApiTest.php index 25586554a..8702b3806 100644 --- a/tests/Controller/Customer/CustomerResendVerificationTokenApiTest.php +++ b/tests/Controller/Customer/CustomerResendVerificationTokenApiTest.php @@ -22,14 +22,14 @@ public function it_allows_to_resend_verification_token(): void $this->loadFixturesFromFiles(['channel.yml']); $data = -<<client->request('POST', '/shop-api/register', [], [], self::CONTENT_TYPE_HEADER, $data); diff --git a/tests/Controller/Customer/CustomerResetPasswordApiTest.php b/tests/Controller/Customer/CustomerResetPasswordApiTest.php index a942f2bde..bde927947 100644 --- a/tests/Controller/Customer/CustomerResetPasswordApiTest.php +++ b/tests/Controller/Customer/CustomerResetPasswordApiTest.php @@ -33,14 +33,14 @@ public function it_allows_to_reset_customer_password(): void $user = $userRepository->findOneByEmail('oliver@queen.com'); $newPasswords = -<<client->request('PUT', '/shop-api/password-reset/' . $user->getPasswordResetToken(), [], [], self::CONTENT_TYPE_HEADER, $newPasswords); diff --git a/tests/Controller/Customer/CustomerUpdateCustomerApiTest.php b/tests/Controller/Customer/CustomerUpdateCustomerApiTest.php index ff26994a9..52b12208b 100644 --- a/tests/Controller/Customer/CustomerUpdateCustomerApiTest.php +++ b/tests/Controller/Customer/CustomerUpdateCustomerApiTest.php @@ -27,7 +27,7 @@ public function it_updates_customer(): void $customerRepository = $this->get('sylius.repository.customer'); $data = -<<client->request('PUT', '/shop-api/me', [], [], self::CONTENT_TYPE_HEADER, $data); $response = $this->client->getResponse(); $this->assertResponse($response, 'customer/update_customer', Response::HTTP_OK); @@ -62,7 +62,7 @@ public function it_does_not_allow_to_update_customer_without_being_logged_in(): $this->loadFixturesFromFiles(['channel.yml', 'customer.yml']); $data = -<<client->request('PUT', '/shop-api/me', [], [], self::CONTENT_TYPE_HEADER, $data); $response = $this->client->getResponse(); $this->assertResponseCode($response, Response::HTTP_INTERNAL_SERVER_ERROR); @@ -87,7 +87,7 @@ public function it_does_not_allow_to_update_customer_without_passing_required_da $this->logInUser('oliver@queen.com', '123password'); $data = -<<client->request('PUT', '/shop-api/me', [], [], self::CONTENT_TYPE_HEADER, $data); $response = $this->client->getResponse(); $this->assertResponse($response, 'customer/validation_empty_data', Response::HTTP_BAD_REQUEST); diff --git a/tests/Controller/Customer/CustomerVerifyApiTest.php b/tests/Controller/Customer/CustomerVerifyApiTest.php index 7bdc89e14..5e272c679 100644 --- a/tests/Controller/Customer/CustomerVerifyApiTest.php +++ b/tests/Controller/Customer/CustomerVerifyApiTest.php @@ -22,14 +22,14 @@ public function it_allows_to_verify_customer(): void $this->loadFixturesFromFiles(['channel.yml']); $data = -<<client->request('POST', '/shop-api/register', [], [], self::CONTENT_TYPE_HEADER, $data); diff --git a/tests/Controller/Customer/LoggedInCustomerDetailsActionTest.php b/tests/Controller/Customer/LoggedInCustomerDetailsActionTest.php index b39b686fc..760972962 100644 --- a/tests/Controller/Customer/LoggedInCustomerDetailsActionTest.php +++ b/tests/Controller/Customer/LoggedInCustomerDetailsActionTest.php @@ -17,12 +17,12 @@ public function it_shows_currently_logged_in_customer_details(): void $this->loadFixturesFromFiles(['channel.yml', 'customer.yml']); $data = -<<client->request('POST', '/shop-api/login_check', [], [], self::CONTENT_TYPE_HEADER, $data); diff --git a/tests/Controller/Product/ProductAddReviewByCodeApiTest.php b/tests/Controller/Product/ProductAddReviewByCodeApiTest.php index 7d54d5732..2bc230ce3 100644 --- a/tests/Controller/Product/ProductAddReviewByCodeApiTest.php +++ b/tests/Controller/Product/ProductAddReviewByCodeApiTest.php @@ -17,14 +17,14 @@ public function it_adds_review_to_product(): void $this->loadFixturesFromFiles(['shop.yml']); $data = -<<client->request('POST', '/shop-api/products/by-code/LOGAN_MUG_CODE/reviews', [], [], self::CONTENT_TYPE_HEADER, $data); $response = $this->client->getResponse(); @@ -39,14 +39,14 @@ public function it_adds_review_to_the_product_for_registered_user(): void $this->loadFixturesFromFiles(['shop.yml', 'customer.yml']); $data = -<<client->request('POST', '/shop-api/products/by-code/LOGAN_MUG_CODE/reviews', [], [], self::CONTENT_TYPE_HEADER, $data); $response = $this->client->getResponse(); @@ -61,7 +61,7 @@ public function it_does_not_allow_to_add_review_when_rating_is_out_of_bounds(): $this->loadFixturesFromFiles(['channel.yml', 'shop.yml']); $data = -<<client->request('POST', '/shop-api/products/by-code/LOGAN_MUG_CODE/reviews', [], [], self::CONTENT_TYPE_HEADER, $data); @@ -85,7 +85,7 @@ public function it_does_not_allow_to_add_review_when_email_is_not_valid(): void $this->loadFixturesFromFiles(['channel.yml', 'shop.yml']); $data = -<<client->request('POST', '/shop-api/products/by-code/LOGAN_MUG_CODE/reviews', [], [], self::CONTENT_TYPE_HEADER, $data); diff --git a/tests/Controller/Product/ProductAddReviewBySlugApiTest.php b/tests/Controller/Product/ProductAddReviewBySlugApiTest.php index af55f888e..f722a73f1 100644 --- a/tests/Controller/Product/ProductAddReviewBySlugApiTest.php +++ b/tests/Controller/Product/ProductAddReviewBySlugApiTest.php @@ -17,14 +17,14 @@ public function it_adds_review_to_product(): void $this->loadFixturesFromFiles(['shop.yml']); $data = -<<client->request('POST', '/shop-api/products/by-slug/logan-mug/reviews', [], [], self::CONTENT_TYPE_HEADER, $data); $response = $this->client->getResponse(); @@ -39,14 +39,14 @@ public function it_adds_review_to_the_product_for_registered_user(): void $this->loadFixturesFromFiles(['shop.yml', 'customer.yml']); $data = -<<client->request('POST', '/shop-api/products/by-slug/logan-mug/reviews', [], [], self::CONTENT_TYPE_HEADER, $data); $response = $this->client->getResponse(); @@ -61,14 +61,14 @@ public function it_does_not_allow_to_add_review_when_rating_is_out_of_bounds(): $this->loadFixturesFromFiles(['channel.yml', 'shop.yml']); $data = -<<client->request('POST', '/shop-api/products/by-slug/mug/reviews', [], [], self::CONTENT_TYPE_HEADER, $data); @@ -84,14 +84,14 @@ public function it_does_not_allow_to_add_review_when_rating_email_is_not_valid() $this->loadFixturesFromFiles(['channel.yml', 'shop.yml']); $data = -<<client->request('POST', '/shop-api/products/by-slug/mug/reviews', [], [], self::CONTENT_TYPE_HEADER, $data); diff --git a/tests/Controller/Utils/ShopUserLoginTrait.php b/tests/Controller/Utils/ShopUserLoginTrait.php index 5a846a513..ed65bb785 100644 --- a/tests/Controller/Utils/ShopUserLoginTrait.php +++ b/tests/Controller/Utils/ShopUserLoginTrait.php @@ -16,12 +16,12 @@ trait ShopUserLoginTrait protected function logInUser(string $username, string $password): void { $data = -<<client->request('POST', '/shop-api/login_check', [], [], ['CONTENT_TYPE' => 'application/json', 'ACCEPT' => 'application/json'], $data); Assert::assertSame($this->client->getResponse()->getStatusCode(), Response::HTTP_OK);