mirror of
https://github.com/archtechx/tenancy.git
synced 2026-02-05 11:44:04 +00:00
verify both laravel versions are used
This commit is contained in:
parent
f3645dd65c
commit
ba8e9b0261
1 changed files with 8 additions and 0 deletions
|
|
@ -25,6 +25,10 @@ class TenantManagerTest extends TestCase
|
||||||
/** @test */
|
/** @test */
|
||||||
public function current_tenant_can_be_retrieved_using_getTenant()
|
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();
|
$tenant = Tenant::new()->withDomains(['test2.localhost'])->save();
|
||||||
|
|
||||||
tenancy()->init('test2.localhost');
|
tenancy()->init('test2.localhost');
|
||||||
|
|
@ -35,6 +39,10 @@ class TenantManagerTest extends TestCase
|
||||||
/** @test */
|
/** @test */
|
||||||
public function initById_works()
|
public function initById_works()
|
||||||
{
|
{
|
||||||
|
if (app()->version()[0] === '6') {
|
||||||
|
$this->fail('laravel 7 is used');
|
||||||
|
}
|
||||||
|
|
||||||
$tenant = Tenant::new()->withDomains(['foo.localhost'])->save();
|
$tenant = Tenant::new()->withDomains(['foo.localhost'])->save();
|
||||||
|
|
||||||
$this->assertNotEquals($tenant, tenancy()->getTenant());
|
$this->assertNotEquals($tenant, tenancy()->getTenant());
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue