1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2025-12-12 11:34:03 +00:00

Add TestCase@initTenancy

This commit is contained in:
Samuel Štancl 2019-02-07 22:28:41 +01:00
parent 124e747aa0
commit 3857c4a27d
2 changed files with 9 additions and 4 deletions

View file

@ -16,7 +16,7 @@ class TestCase extends \Orchestra\Testbench\TestCase
protected function setUp()
{
parent::setUp();
Redis::connection('tenancy')->flushdb();
tenant()->create('localhost');
@ -84,4 +84,9 @@ class TestCase extends \Orchestra\Testbench\TestCase
// set one of these environment vars on their computer.
return env('CI') && env('TRAVIS') && env('CONTINUOUS_INTEGRATION');
}
public function initTenancy($domain = 'localhost')
{
tenancy()->init($domain);
}
}