Skip to content

Commit 24db931

Browse files
committed
Add assertions on id type
1 parent 019460c commit 24db931

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tests/Queue/Failed/DatabaseFailedJobProviderTest.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,9 @@ public function testAll(): void
7777
$all = $this->getProvider()->all();
7878

7979
$this->assertCount(5, $all);
80+
$this->assertInstanceOf(ObjectId::class, $all[0]->id);
8081
$this->assertEquals(new ObjectId(sprintf('%024d', 5)), $all[0]->id);
81-
$this->assertEquals(sprintf('%024d', 5), $all[0]->id, 'id field is added for compatibility with DatabaseFailedJobProvider');
82+
$this->assertEquals(sprintf('%024d', 5), (string) $all[0]->id, 'id field is added for compatibility with DatabaseFailedJobProvider');
8283
}
8384

8485
public function testFindAndForget(): void
@@ -89,6 +90,7 @@ public function testFindAndForget(): void
8990
$found = $provider->find($id);
9091

9192
$this->assertIsObject($found, 'The job is found');
93+
$this->assertInstanceOf(ObjectId::class, $found->id);
9294
$this->assertEquals(new ObjectId($id), $found->id);
9395
$this->assertObjectHasProperty('failed_at', $found);
9496

0 commit comments

Comments
 (0)