diff --git a/tests/Integration/Auth/CanDirectiveDBTest.php b/tests/Integration/Auth/CanDirectiveDBTest.php index fbfbf5e6e..b5a498238 100644 --- a/tests/Integration/Auth/CanDirectiveDBTest.php +++ b/tests/Integration/Auth/CanDirectiveDBTest.php @@ -93,6 +93,7 @@ public function testFailsToFindSpecificModel(): void ], ]); } + public function testThrowsCustomExceptionWhenFailsToFindModel(): void { $user = new User(); @@ -129,7 +130,7 @@ public function testThrowsCustomExceptionWhenFailsToFindModel(): void $previous = $error->getPrevious(); $this->assertNotNull($previous); - $this->assertSame(ClientSafeModelNotFoundException::class, get_class($previous)); + $this->assertInstanceOf(ClientSafeModelNotFoundException::class, $previous); } } diff --git a/tests/Integration/Auth/CanFindDirectiveDBTest.php b/tests/Integration/Auth/CanFindDirectiveDBTest.php index 36059ee87..1a93535d3 100644 --- a/tests/Integration/Auth/CanFindDirectiveDBTest.php +++ b/tests/Integration/Auth/CanFindDirectiveDBTest.php @@ -166,7 +166,7 @@ public function testThrowsCustomExceptionWhenFailsToFindModel(): void $previous = $error->getPrevious(); $this->assertNotNull($previous); - $this->assertSame(ClientSafeModelNotFoundException::class, get_class($previous)); + $this->assertInstanceOf(ClientSafeModelNotFoundException::class, $previous); } }