11<?php
22/**
3- * Copyright © Magento, Inc. All rights reserved.
4- * See COPYING.txt for license details .
3+ * Copyright 2020 Adobe
4+ * All Rights Reserved .
55 */
66declare (strict_types=1 );
77
2020use Magento \TestFramework \Interception \PluginList ;
2121use Magento \TestFramework \Quote \Model \GetQuoteByReservedOrderId ;
2222use PHPUnit \Framework \TestCase ;
23+ use Magento \TestFramework \Fixture \DataFixture ;
24+ use Magento \TestFramework \Fixture \Config ;
25+ use Magento \Customer \Test \Fixture \Customer ;
26+ use Magento \Quote \Test \Fixture \CustomerCart ;
27+ use Magento \Catalog \Test \Fixture \Product as ProductFixture ;
28+ use Magento \Quote \Test \Fixture \AddProductToCart as AddProductToCartFixture ;
2329
2430/**
2531 * Test for checkout config provider plugin
@@ -131,11 +137,19 @@ public function testWithLoggedCustomer(): void
131137 }
132138
133139 /**
134- * @magentoDataFixture Magento/Checkout/_files/quote_with_customer_without_address.php
135- * @magentoConfigFixture current_store persistent/options/enabled 0
136- *
137140 * @return void
138141 */
142+ #[
143+ Config('persistent/options/enabled ' , 0 , scopeType: \Magento \Store \Model \ScopeInterface::SCOPE_STORE ),
144+ DataFixture(Customer::class, as: 'customer ' ),
145+ DataFixture(
146+ CustomerCart::class,
147+ ['customer_id ' => '$customer.id$ ' , 'reserved_order_id ' => 'test_order_with_customer_without_address ' ],
148+ as: 'cart '
149+ ),
150+ DataFixture(ProductFixture::class, as: 'product ' ),
151+ DataFixture(AddProductToCartFixture::class, ['cart_id ' => '$cart.id$ ' , 'product_id ' => '$product.id$ ' ]),
152+ ]
139153 public function testPersistentDisabled (): void
140154 {
141155 $ quote = $ this ->getQuoteByReservedOrderId ->execute ('test_order_with_customer_without_address ' );
@@ -145,11 +159,19 @@ public function testPersistentDisabled(): void
145159 }
146160
147161 /**
148- * @magentoDataFixture Magento/Checkout/_files/quote_with_customer_without_address.php
149- * @magentoConfigFixture current_store persistent/options/enabled 1
150- *
151162 * @return void
152163 */
164+ #[
165+ Config('persistent/options/enabled ' , 1 , scopeType: \Magento \Store \Model \ScopeInterface::SCOPE_STORE ),
166+ DataFixture(Customer::class, as: 'customer ' ),
167+ DataFixture(
168+ CustomerCart::class,
169+ ['customer_id ' => '$customer.id$ ' , 'reserved_order_id ' => 'test_order_with_customer_without_address ' ],
170+ as: 'cart '
171+ ),
172+ DataFixture(ProductFixture::class, as: 'product ' ),
173+ DataFixture(AddProductToCartFixture::class, ['cart_id ' => '$cart.id$ ' , 'product_id ' => '$product.id$ ' ]),
174+ ]
153175 public function testWithoutPersistentSession (): void
154176 {
155177 $ quote = $ this ->getQuoteByReservedOrderId ->execute ('test_order_with_customer_without_address ' );
0 commit comments