99
1010use Magento \Framework \Lock \LockManagerInterface ;
1111use Magento \GraphQl \Model \Query \Context ;
12- use Magento \GraphQl \Model \Query \ContextExtension ;
12+ use Magento \GraphQl \Model \Query \ContextExtensionInterface ;
13+ use Magento \Sales \Model \Order ;
1314use Magento \Sales \Model \OrderFactory ;
1415use Magento \Sales \Model \Reorder \Reorder ;
16+ use Magento \Store \Api \Data \StoreInterface ;
1517use PHPUnit \Framework \MockObject \MockObject ;
1618use PHPUnit \Framework \TestCase ;
1719use Magento \SalesGraphQl \Model \Resolver \Reorder as Subject ;
@@ -26,7 +28,7 @@ class ReorderTest extends TestCase
2628 private $ subject ;
2729
2830 /**
29- * @var ContextExtension |MockObject
31+ * @var ContextExtensionInterface |MockObject
3032 */
3133 private $ extensionAttributesMock ;
3234
@@ -73,12 +75,14 @@ public function testResolve(): void
7375 $ args = ['orderNumber ' => '00000010 ' ];
7476 $ value = [];
7577
76- $ this ->extensionAttributesMock = $ this ->createMock (ContextExtension::class);
78+ $ this ->extensionAttributesMock = $ this ->getMockBuilder (ContextExtensionInterface::class)
79+ ->disableOriginalConstructor ()
80+ ->getMockForAbstractClass ();
7781 $ this ->extensionAttributesMock ->expects ($ this ->once ())
7882 ->method ('getIsCustomer ' )
7983 ->willReturn (true );
8084
81- $ store = $ this ->createMock (\ Magento \ Store \ Api \ Data \ StoreInterface::class);
85+ $ store = $ this ->createMock (StoreInterface::class);
8286 $ store ->expects ($ this ->once ())
8387 ->method ('getId ' )
8488 ->willReturn (1 );
@@ -94,7 +98,7 @@ public function testResolve(): void
9498 ->method ('getUserId ' )
9599 ->willReturn ($ contextCustomerId );
96100
97- $ order = $ this ->createMock (\ Magento \ Sales \ Model \ Order::class);
101+ $ order = $ this ->createMock (Order::class);
98102 $ order ->expects ($ this ->once ())
99103 ->method ('loadByIncrementIdAndStoreId ' )
100104 ->willReturnSelf ();
0 commit comments