1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2025-12-12 16:14:02 +00:00
This commit is contained in:
Samuel Štancl 2019-08-03 21:25:00 +02:00
parent 2cf96423b0
commit 7c598ae2fe
5 changed files with 46 additions and 3 deletions

View file

@ -2,8 +2,6 @@
namespace Stancl\Tenancy\Tests;
use Stancl\Tenancy\Interfaces\StorageDriver;
class TenantStorageTest extends TestCase
{
/** @test */

View file

@ -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()