1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2026-02-05 08:44:04 +00:00

verify both laravel versions are used

This commit is contained in:
Samuel Štancl 2020-03-04 21:13:51 +01:00
parent f3645dd65c
commit ba8e9b0261

View file

@ -25,6 +25,10 @@ class TenantManagerTest extends TestCase
/** @test */
public function current_tenant_can_be_retrieved_using_getTenant()
{
if (app()->version()[0] === '6') {
$this->fail('laravel 6 is used');
}
$tenant = Tenant::new()->withDomains(['test2.localhost'])->save();
tenancy()->init('test2.localhost');
@ -35,6 +39,10 @@ class TenantManagerTest extends TestCase
/** @test */
public function initById_works()
{
if (app()->version()[0] === '6') {
$this->fail('laravel 7 is used');
}
$tenant = Tenant::new()->withDomains(['foo.localhost'])->save();
$this->assertNotEquals($tenant, tenancy()->getTenant());