File tree Expand file tree Collapse file tree 3 files changed +10
-34
lines changed
WishlistGraphQl/etc/graphql
Block/Customer/Wishlist/Item Expand file tree Collapse file tree 3 files changed +10
-34
lines changed Original file line number Diff line number Diff line change 1313use Magento \Framework \App \Http \Context ;
1414use Magento \Framework \Escaper ;
1515use Magento \Framework \Event \ManagerInterface ;
16- use Magento \Framework \TestFramework \Unit \Helper \ObjectManager ;
1716use Magento \Wishlist \Block \Customer \Wishlist \Item \Options ;
1817use Magento \Wishlist \Model \Item ;
1918use PHPUnit \Framework \MockObject \MockObject ;
@@ -77,15 +76,7 @@ protected function setUp(): void
7776 ->disableOriginalConstructor ()
7877 ->getMock ();
7978
80- $ objectManager = new ObjectManager ($ this );
81- $ this ->block = $ objectManager ->getObject (
82- Options::class,
83- [
84- 'context ' => $ productContextMock ,
85- 'httpContext ' => $ this ->httpContextMock ,
86- 'helperPool ' => $ this ->helperPoolMock ,
87- ]
88- );
79+ $ this ->block = new Options ($ productContextMock , $ this ->httpContextMock , $ this ->helperPoolMock );
8980 $ this ->block ->setItem ($ this ->itemMock );
9081 $ this ->block ->addOptionsRenderCfg (self ::TEST_PRODUCT_TYPE , self ::TEST_HELPER_CLASS_NAME );
9182 }
Original file line number Diff line number Diff line change 3535use Magento \Wishlist \Model \ResourceModel \Wishlist as WishlistResource ;
3636use Magento \Wishlist \Model \ResourceModel \Wishlist \Collection as WishlistCollection ;
3737use Magento \Wishlist \Model \Wishlist ;
38+ use Magento \Wishlist \Model \WishlistItemPermissionsCollectionProcessor ;
3839use PHPUnit \Framework \MockObject \MockObject ;
3940use PHPUnit \Framework \TestCase ;
4041
@@ -138,6 +139,11 @@ class WishlistTest extends TestCase
138139 */
139140 private $ stockConfiguration ;
140141
142+ /**
143+ * @var WishlistItemPermissionsCollectionProcessor|MockObject
144+ */
145+ private WishlistItemPermissionsCollectionProcessor $ permissionCollectionProcessor ;
146+
141147 protected function setUp (): void
142148 {
143149 $ context = $ this ->getMockBuilder (Context::class)
@@ -200,6 +206,7 @@ protected function setUp(): void
200206 ->willReturn ($ this ->eventDispatcher );
201207
202208 $ this ->stockConfiguration = $ this ->createMock (StockConfigurationInterface::class);
209+ $ this ->permissionCollectionProcessor = $ this ->createMock (WishlistItemPermissionsCollectionProcessor::class);
203210
204211 $ this ->wishlist = new Wishlist (
205212 $ context ,
@@ -221,7 +228,8 @@ protected function setUp(): void
221228 $ this ->serializer ,
222229 $ this ->stockRegistry ,
223230 $ this ->scopeConfig ,
224- $ this ->stockConfiguration
231+ $ this ->stockConfiguration ,
232+ $ this ->permissionCollectionProcessor
225233 );
226234 }
227235
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments