8
8
namespace Magento \Quote \Test \Unit \Plugin ;
9
9
10
10
use Magento \Framework \Event \Observer ;
11
- use Magento \Framework \Webapi \ Rest \ Request as RestRequest ;
11
+ use Magento \Framework \App \ RequestInterface ;
12
12
use Magento \Quote \Observer \SubmitObserver ;
13
13
use Magento \Quote \Plugin \SendOrderNotification ;
14
14
use PHPUnit \Framework \MockObject \MockObject ;
22
22
class SendOrderNotificationTest extends TestCase
23
23
{
24
24
/**
25
- * @var RestRequest|RestRequest &MockObject|MockObject
25
+ * @var RequestInterface|RequestInterface &MockObject|MockObject
26
26
*/
27
- private RestRequest $ request ;
27
+ private RequestInterface $ request ;
28
28
29
29
/**
30
30
* @var SubmitObserver|SubmitObserver&MockObject|MockObject
@@ -46,7 +46,7 @@ class SendOrderNotificationTest extends TestCase
46
46
*/
47
47
protected function setUp (): void
48
48
{
49
- $ this ->request = $ this ->createMock (RestRequest ::class);
49
+ $ this ->request = $ this ->createMock (RequestInterface ::class);
50
50
$ this ->subject = $ this ->createMock (SubmitObserver::class);
51
51
$ this ->observer = $ this ->createMock (Observer::class);
52
52
$ this ->notification = new SendOrderNotification ($ this ->request );
@@ -57,7 +57,7 @@ protected function setUp(): void
57
57
*/
58
58
public function testBeforeExecuteWithSendConfirmation ()
59
59
{
60
- $ this ->request ->expects ($ this ->once ())->method ('getPostValue ' )->with ('order ' )
60
+ $ this ->request ->expects ($ this ->once ())->method ('getParam ' )->with ('order ' )
61
61
->willReturn (['send_confirmation ' => 1 ]);
62
62
63
63
$ order = $ this ->getMockBuilder (Order::class)
@@ -88,7 +88,7 @@ public function testBeforeExecuteWithSendConfirmation()
88
88
*/
89
89
public function testBeforeExecuteWithoutSendConfirmation ()
90
90
{
91
- $ this ->request ->expects ($ this ->once ())->method ('getPostValue ' )->with ('order ' )
91
+ $ this ->request ->expects ($ this ->once ())->method ('getParam ' )->with ('order ' )
92
92
->willReturn (['order ' => []]);
93
93
94
94
$ order = $ this ->getMockBuilder (Order::class)
0 commit comments