@@ -101,6 +101,7 @@ protected function setUp()
101
101
->getMockForAbstractClass ();
102
102
$ this ->actionFlagMock = $ this ->createMock (ActionFlag::class);
103
103
$ this ->messageManagerMock = $ this ->createMock (ManagerInterface::class);
104
+ $ this ->requestMock = $ this ->createMock (HttpRequest::class);
104
105
105
106
$ objectManager = new ObjectManagerHelper ($ this );
106
107
$ this ->observer = $ objectManager ->getObject (
@@ -110,7 +111,8 @@ protected function setUp()
110
111
'captchaStringResolver ' => $ this ->captchaStringResolverMock ,
111
112
'_session ' => $ this ->sessionMock ,
112
113
'_actionFlag ' => $ this ->actionFlagMock ,
113
- 'messageManager ' => $ this ->messageManagerMock
114
+ 'messageManager ' => $ this ->messageManagerMock ,
115
+ 'request ' => $ this ->requestMock
114
116
]
115
117
);
116
118
@@ -122,16 +124,12 @@ protected function setUp()
122
124
->with ($ formId )
123
125
->willReturn ($ this ->captchaMock );
124
126
125
- $ this ->requestMock = $ this ->createMock (HttpRequest::class);
126
127
$ this ->httpResponseMock = $ this ->createMock (HttpResponse::class);
127
128
128
129
$ this ->controllerMock = $ this ->getMockBuilder (Action::class)
129
130
->disableOriginalConstructor ()
130
- ->setMethods (['getUrl ' , 'getRequest ' , ' getResponse ' ])
131
+ ->setMethods (['getUrl ' , 'getResponse ' ])
131
132
->getMockForAbstractClass ();
132
- $ this ->controllerMock ->expects ($ this ->any ())
133
- ->method ('getRequest ' )
134
- ->willReturn ($ this ->requestMock );
135
133
$ this ->controllerMock ->expects ($ this ->any ())
136
134
->method ('getResponse ' )
137
135
->willReturn ($ this ->httpResponseMock );
0 commit comments