Commit e8b6e756 authored by Denisson Leal's avatar Denisson Leal

Merge branch 'master' of github.com:denissonleal/laravel-mongodb into hotfix/multiconnection-queue

parents 59546dcf f826130f
......@@ -45,6 +45,7 @@ composer require jenssegers/mongodb
5.6.x | 3.4.x
5.7.x | 3.4.x
5.8.x | 3.5.x
6.0.x | 3.6.x
And add the service provider in `config/app.php`:
......
......@@ -46,6 +46,10 @@ class MongoFailedJobProvider extends DatabaseFailedJobProvider
{
$job = $this->getTable()->find($id);
if (!$job) {
return;
}
$job['id'] = (string) $job['_id'];
return (object) $job;
......
......@@ -64,4 +64,12 @@ class QueueTest extends TestCase
$this->assertInstanceOf(MongoFailedJobProvider::class, $provider);
}
public function testFindFailJobNull(): void
{
Config::set('queue.failed.database', 'mongodb');
$provider = app('queue.failer');
$this->assertNull($provider->find(1));
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment