99
1010use Magento \Authorization \Test \Fixture \Role as RoleFixture ;
1111use Magento \Catalog \Api \ProductRepositoryInterface ;
12- use Magento \Catalog \Api \SpecialPriceStorageInterface ;
1312use Magento \Framework \Webapi \Rest \Request ;
1413use Magento \Integration \Api \AdminTokenServiceInterface ;
1514use Magento \Store \Model \StoreManagerInterface ;
@@ -31,11 +30,6 @@ class SpecialPriceStoragePluginTest extends WebapiAbstract
3130 */
3231 private $ fixtures ;
3332
34- /**
35- * @var SpecialPriceStorageInterface
36- */
37- private SpecialPriceStorageInterface $ specialPriceStorage ;
38-
3933 /**
4034 * @var ProductRepositoryInterface
4135 */
@@ -50,36 +44,14 @@ protected function setUp(): void
5044 {
5145 $ this ->fixtures = Bootstrap::getObjectManager ()->get (DataFixtureStorageManager::class)->getStorage ();
5246 $ objectManager = Bootstrap::getObjectManager ();
53- $ this ->specialPriceStorage = $ objectManager ->get (SpecialPriceStorageInterface::class);
5447 $ this ->productRepository = $ objectManager ->get (ProductRepositoryInterface::class);
5548 $ this ->storeManager = $ objectManager ->get (StoreManagerInterface::class);
56-
5749 }
5850
5951 #[
6052 DataFixture(ProductFixture::class, as: 'product ' ),
6153 DataFixture(RoleFixture::class, as: 'restrictedRole ' ),
6254 DataFixture(UserFixture::class, ['role_id ' => '$restrictedRole.id$ ' ], 'restrictedUser ' ),
63- DataFixture(
64- \Magento \Customer \Test \Fixture \Customer::class,
65- [
66- 'email ' => 'john@doe.com ' ,
67- 'password ' => 'test@123 ' ,
68- 'addresses ' => [
69- [
70- 'country_id ' => 'US ' ,
71- 'region_id ' => 32 ,
72- 'city ' => 'Boston ' ,
73- 'street ' => ['10 Milk Street ' ],
74- 'postcode ' => '02108 ' ,
75- 'telephone ' => '1234567890 ' ,
76- 'default_billing ' => true ,
77- 'default_shipping ' => true ,
78- ],
79- ],
80- ],
81- 'customer '
82- ),
8355 ]
8456 public function testSpecialPriceIsAppliedToAllStoresInWebsite (): void
8557 {
@@ -93,16 +65,14 @@ public function testSpecialPriceIsAppliedToAllStoresInWebsite(): void
9365 $ website = $ Store ->getWebsite ();
9466 $ storeIds = $ website ->getStoreIds ();
9567
96- $ customer = $ this ->fixtures ->get ('customer ' );
9768 $ restrictedUser = $ this ->fixtures ->get ('restrictedUser ' );
9869
9970 $ adminTokens = Bootstrap::getObjectManager ()->get (AdminTokenServiceInterface::class);
10071 $ accessToken = $ adminTokens ->createAdminAccessToken (
10172 $ restrictedUser ->getData ('username ' ),
10273 \Magento \TestFramework \Bootstrap::ADMIN_PASSWORD
10374 );
104-
105-
75+
10676 $ data = [
10777 'sku ' => $ sku ,
10878 'price ' =>123.45 ,
0 commit comments