1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2026-02-05 17:14:03 +00:00

skip tests for old versions

This commit is contained in:
Riley Schoppa 2022-06-13 21:09:40 -04:00
parent b0876ae8d8
commit abd55556e2

View file

@ -6,6 +6,7 @@ namespace Stancl\Tenancy\Tests;
use Illuminate\Bus\BatchRepository; use Illuminate\Bus\BatchRepository;
use Illuminate\Support\Facades\Event; use Illuminate\Support\Facades\Event;
use Illuminate\Support\Str;
use ReflectionClass; use ReflectionClass;
use Stancl\Tenancy\Bootstrappers\BatchTenancyBootstrapper; use Stancl\Tenancy\Bootstrappers\BatchTenancyBootstrapper;
use Stancl\Tenancy\Bootstrappers\DatabaseTenancyBootstrapper; use Stancl\Tenancy\Bootstrappers\DatabaseTenancyBootstrapper;
@ -37,6 +38,10 @@ class BatchTest extends TestCase
/** @test */ /** @test */
public function batch_repository_is_set_to_tenant_connection_and_reverted() 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(); $tenant = Tenant::create();
$this->assertEquals('central', $this->getBatchRepositoryConnectionName(), 'Expected initial connection to be central'); $this->assertEquals('central', $this->getBatchRepositoryConnectionName(), 'Expected initial connection to be central');