Skip to content

Commit

Permalink
Fix tests on older Laravel versions
Browse files Browse the repository at this point in the history
  • Loading branch information
stayallive committed Apr 11, 2024
1 parent e6c72bc commit 327e14d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/Sentry/Integration/ModelViolationReportersTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ class ModelViolationReportersTest extends TestCase
{
public function testModelViolationReportersCanBeRegistered(): void
{
if (!method_exists(Model::class, 'handleLazyLoadingViolationUsing')) {
$this->markTestSkipped('Laravel introduced model violations in version 9.');
}

$this->expectNotToPerformAssertions();

Model::handleLazyLoadingViolationUsing(Integration::lazyLoadingViolationReporter());
Expand Down

0 comments on commit 327e14d

Please sign in to comment.