From abd55556e2075fb0761ca3ef7d3c0e3506561917 Mon Sep 17 00:00:00 2001 From: Riley Schoppa Date: Mon, 13 Jun 2022 21:09:40 -0400 Subject: [PATCH] skip tests for old versions --- tests/BatchTest.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/BatchTest.php b/tests/BatchTest.php index 154822c1..66ebaec5 100644 --- a/tests/BatchTest.php +++ b/tests/BatchTest.php @@ -6,6 +6,7 @@ namespace Stancl\Tenancy\Tests; use Illuminate\Bus\BatchRepository; use Illuminate\Support\Facades\Event; +use Illuminate\Support\Str; use ReflectionClass; use Stancl\Tenancy\Bootstrappers\BatchTenancyBootstrapper; use Stancl\Tenancy\Bootstrappers\DatabaseTenancyBootstrapper; @@ -37,6 +38,10 @@ class BatchTest extends TestCase /** @test */ public function batch_repository_is_set_to_tenant_connection_and_reverted() { + if (! version_compare(app()->version(), '8.0', '>=')) { + $this->markTestSkipped('Job batches are only supported in Laravel 8+'); + } + $tenant = Tenant::create(); $this->assertEquals('central', $this->getBatchRepositoryConnectionName(), 'Expected initial connection to be central');