mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-12 16:14:02 +00:00
wip
This commit is contained in:
parent
2cf96423b0
commit
7c598ae2fe
5 changed files with 46 additions and 3 deletions
|
|
@ -2,8 +2,6 @@
|
|||
|
||||
namespace Stancl\Tenancy\Tests;
|
||||
|
||||
use Stancl\Tenancy\Interfaces\StorageDriver;
|
||||
|
||||
class TenantStorageTest extends TestCase
|
||||
{
|
||||
/** @test */
|
||||
|
|
|
|||
|
|
@ -9,6 +9,13 @@ abstract class TestCase extends \Orchestra\Testbench\TestCase
|
|||
public $autoCreateTenant = true;
|
||||
public $autoInitTenancy = true;
|
||||
|
||||
private function checkRequirements(): void
|
||||
{
|
||||
parent::checkRequirements();
|
||||
|
||||
dd($this->getAnnotations());
|
||||
}
|
||||
|
||||
/**
|
||||
* Setup the test environment
|
||||
*
|
||||
|
|
@ -81,6 +88,20 @@ abstract class TestCase extends \Orchestra\Testbench\TestCase
|
|||
'tenancy.redis.prefixed_connections' => ['default'],
|
||||
'tenancy.migrations_directory' => database_path('../migrations'),
|
||||
]);
|
||||
|
||||
switch((string) env('STANCL_TENANCY_TEST_VARIANT', '1')) {
|
||||
case '2':
|
||||
$app['config']->set([
|
||||
'tenancy.redis.tenancy' => true,
|
||||
'database.redis.client' => 'phpredis',
|
||||
]);
|
||||
break;
|
||||
default:
|
||||
$app['config']->set([
|
||||
'tenancy.redis.tenancy' => false,
|
||||
'database.redis.client' => 'predis',
|
||||
]);
|
||||
};
|
||||
}
|
||||
|
||||
protected function loadDotEnv()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue