9
9
10
10
use Magento \Framework \Lock \LockManagerInterface ;
11
11
use 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 ;
13
14
use Magento \Sales \Model \OrderFactory ;
14
15
use Magento \Sales \Model \Reorder \Reorder ;
16
+ use Magento \Store \Api \Data \StoreInterface ;
15
17
use PHPUnit \Framework \MockObject \MockObject ;
16
18
use PHPUnit \Framework \TestCase ;
17
19
use Magento \SalesGraphQl \Model \Resolver \Reorder as Subject ;
@@ -26,7 +28,7 @@ class ReorderTest extends TestCase
26
28
private $ subject ;
27
29
28
30
/**
29
- * @var ContextExtension |MockObject
31
+ * @var ContextExtensionInterface |MockObject
30
32
*/
31
33
private $ extensionAttributesMock ;
32
34
@@ -73,12 +75,14 @@ public function testResolve(): void
73
75
$ args = ['orderNumber ' => '00000010 ' ];
74
76
$ value = [];
75
77
76
- $ this ->extensionAttributesMock = $ this ->createMock (ContextExtension::class);
78
+ $ this ->extensionAttributesMock = $ this ->getMockBuilder (ContextExtensionInterface::class)
79
+ ->disableOriginalConstructor ()
80
+ ->getMockForAbstractClass ();
77
81
$ this ->extensionAttributesMock ->expects ($ this ->once ())
78
82
->method ('getIsCustomer ' )
79
83
->willReturn (true );
80
84
81
- $ store = $ this ->createMock (\ Magento \ Store \ Api \ Data \ StoreInterface::class);
85
+ $ store = $ this ->createMock (StoreInterface::class);
82
86
$ store ->expects ($ this ->once ())
83
87
->method ('getId ' )
84
88
->willReturn (1 );
@@ -94,7 +98,7 @@ public function testResolve(): void
94
98
->method ('getUserId ' )
95
99
->willReturn ($ contextCustomerId );
96
100
97
- $ order = $ this ->createMock (\ Magento \ Sales \ Model \ Order::class);
101
+ $ order = $ this ->createMock (Order::class);
98
102
$ order ->expects ($ this ->once ())
99
103
->method ('loadByIncrementIdAndStoreId ' )
100
104
->willReturnSelf ();
0 commit comments