9
9
10
10
use Magento \Authorization \Test \Fixture \Role as RoleFixture ;
11
11
use Magento \Catalog \Api \ProductRepositoryInterface ;
12
- use Magento \Catalog \Api \SpecialPriceStorageInterface ;
13
12
use Magento \Framework \Webapi \Rest \Request ;
14
13
use Magento \Integration \Api \AdminTokenServiceInterface ;
15
14
use Magento \Store \Model \StoreManagerInterface ;
@@ -31,11 +30,6 @@ class SpecialPriceStoragePluginTest extends WebapiAbstract
31
30
*/
32
31
private $ fixtures ;
33
32
34
- /**
35
- * @var SpecialPriceStorageInterface
36
- */
37
- private SpecialPriceStorageInterface $ specialPriceStorage ;
38
-
39
33
/**
40
34
* @var ProductRepositoryInterface
41
35
*/
@@ -50,36 +44,14 @@ protected function setUp(): void
50
44
{
51
45
$ this ->fixtures = Bootstrap::getObjectManager ()->get (DataFixtureStorageManager::class)->getStorage ();
52
46
$ objectManager = Bootstrap::getObjectManager ();
53
- $ this ->specialPriceStorage = $ objectManager ->get (SpecialPriceStorageInterface::class);
54
47
$ this ->productRepository = $ objectManager ->get (ProductRepositoryInterface::class);
55
48
$ this ->storeManager = $ objectManager ->get (StoreManagerInterface::class);
56
-
57
49
}
58
50
59
51
#[
60
52
DataFixture(ProductFixture::class, as: 'product ' ),
61
53
DataFixture(RoleFixture::class, as: 'restrictedRole ' ),
62
54
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
- ),
83
55
]
84
56
public function testSpecialPriceIsAppliedToAllStoresInWebsite (): void
85
57
{
@@ -93,16 +65,14 @@ public function testSpecialPriceIsAppliedToAllStoresInWebsite(): void
93
65
$ website = $ Store ->getWebsite ();
94
66
$ storeIds = $ website ->getStoreIds ();
95
67
96
- $ customer = $ this ->fixtures ->get ('customer ' );
97
68
$ restrictedUser = $ this ->fixtures ->get ('restrictedUser ' );
98
69
99
70
$ adminTokens = Bootstrap::getObjectManager ()->get (AdminTokenServiceInterface::class);
100
71
$ accessToken = $ adminTokens ->createAdminAccessToken (
101
72
$ restrictedUser ->getData ('username ' ),
102
73
\Magento \TestFramework \Bootstrap::ADMIN_PASSWORD
103
74
);
104
-
105
-
75
+
106
76
$ data = [
107
77
'sku ' => $ sku ,
108
78
'price ' =>123.45 ,
0 commit comments