Skip to content

Commit d2471e6

Browse files
committed
Skip context tests if contexts are not available
1 parent 0e7db17 commit d2471e6

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

test/Sentry/Integration/LaravelContextIntegrationTest.php

+9
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,15 @@
1111

1212
class LaravelContextIntegrationTest extends TestCase
1313
{
14+
protected function setUp(): void
15+
{
16+
if (!class_exists(Context::class)) {
17+
$this->markTestSkipped('Laravel introduced contexts in version 11.');
18+
}
19+
20+
parent::setUp();
21+
}
22+
1423
public function testLaravelContextIntegrationIsRegistered(): void
1524
{
1625
$integration = $this->getSentryHubFromContainer()->getIntegration(LaravelContextIntegration::class);

0 commit comments

Comments
 (0)