File tree Expand file tree Collapse file tree 2 files changed +10
-3
lines changed
Test/Unit/Model/ResourceModel Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ class Queue extends \Magento\Framework\Model\ResourceModel\Db\AbstractDb
27
27
28
28
/**
29
29
* @param Context $context
30
- * @param null $connectionName
30
+ * @param string| null $connectionName
31
31
* @param int|null $chunkSize
32
32
*/
33
33
public function __construct (Context $ context , $ connectionName = null , int $ chunkSize = null )
Original file line number Diff line number Diff line change @@ -285,8 +285,15 @@ function ($arg1, $arg2) use ($tableNames) {
285
285
$ connection ->expects ($ this ->once ())->method ('select ' )->willReturn ($ select );
286
286
$ select ->expects ($ this ->once ())
287
287
->method ('from ' )->with (['queue_message_status ' => $ tableNames [0 ]], ['message_id ' ])->willReturnSelf ();
288
- $ select ->expects ($ this ->once ())->method ('where ' )
289
- ->with ('status = ? ' , QueueManagement::MESSAGE_STATUS_TO_BE_DELETED )
288
+ $ select ->expects ($ this ->once ())->method ('joinLeft ' )
289
+ ->with (
290
+ ['message_status2 ' => 'queue_message_status ' ],
291
+ 'queue_message_status.message_id = message_status2.message_id AND message_status2.status <> ' .
292
+ QueueManagement::MESSAGE_STATUS_TO_BE_DELETED ,
293
+ []
294
+ )
295
+ ->willReturnSelf ();
296
+ $ select ->expects ($ this ->exactly (2 ))->method ('where ' )
290
297
->willReturnSelf ();
291
298
$ select ->expects ($ this ->once ())->method ('distinct ' )->willReturnSelf ();
292
299
$ connection ->expects ($ this ->once ())->method ('fetchCol ' )->with ($ select )->willReturn ([1 , 2 ]);
You can’t perform that action at this time.
0 commit comments