@@ -118,11 +118,11 @@ public function testPrepare($name, $filterData, $expectedCondition)
118
118
$ uiComponent ->method ('convertDate ' )
119
119
->willReturnMap ([
120
120
[
121
- $ filterData [$ name ]['from ' ], 0 , 0 , 0 ,
121
+ $ filterData [$ name ]['from ' ],
122
122
new \DateTime ($ filterData [$ name ]['from ' ], new \DateTimeZone ('UTC ' ))
123
123
],
124
124
[
125
- $ filterData [$ name ]['to ' ], 23 , 59 , 59 ,
125
+ $ filterData [$ name ]['to ' ],
126
126
new \DateTime ($ filterData [$ name ]['to ' ] . ' 23:59:00 ' , new \DateTimeZone ('UTC ' ))
127
127
],
128
128
]);
@@ -161,6 +161,35 @@ public function testPrepare($name, $filterData, $expectedCondition)
161
161
->with ($ filterMock );
162
162
break ;
163
163
}
164
+ } else {
165
+ $ uiComponent ->method ('convertDate ' )
166
+ ->willReturnMap ([
167
+ [
168
+ $ filterData [$ name ]['from ' ],
169
+ new \DateTime ($ filterData [$ name ]['from ' ], new \DateTimeZone ('UTC ' ))
170
+ ],
171
+ [
172
+ $ filterData [$ name ]['to ' ],
173
+ new \DateTime ($ filterData [$ name ]['to ' ] . ' 23:59:00 ' , new \DateTimeZone ('UTC ' ))
174
+ ],
175
+ ]);
176
+ $ this ->filterBuilderMock ->expects (static ::exactly (2 ))
177
+ ->method ('setConditionType ' )
178
+ ->willReturnSelf ();
179
+ $ this ->filterBuilderMock ->expects (static ::exactly (2 ))
180
+ ->method ('setField ' )
181
+ ->willReturnSelf ();
182
+ $ this ->filterBuilderMock ->expects (static ::exactly (2 ))
183
+ ->method ('setValue ' )
184
+ ->willReturnSelf ();
185
+
186
+ $ filterMock = $ this ->getMock (Filter::class);
187
+ $ this ->filterBuilderMock ->expects (static ::exactly (2 ))
188
+ ->method ('create ' )
189
+ ->willReturn ($ filterMock );
190
+ $ this ->dataProviderMock ->expects (static ::exactly (2 ))
191
+ ->method ('addFilter ' )
192
+ ->with ($ filterMock );
164
193
}
165
194
166
195
$ this ->uiComponentFactory ->expects ($ this ->any ())
0 commit comments