1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2026-02-05 11:14:03 +00:00
This commit is contained in:
Samuel Štancl 2019-06-29 13:29:25 +02:00
parent 3abde1a791
commit d2171b5dc5
7 changed files with 58 additions and 13 deletions

View file

@ -3,6 +3,8 @@
namespace Stancl\Tenancy\Tests;
use Illuminate\Support\Facades\Redis;
use Illuminate\Support\Facades\Config;
use Stancl\Tenancy\Exceptions\PhpRedisNotInstalledException;
class BootstrapsTenancyTest extends TestCase
{
@ -30,6 +32,26 @@ class BootstrapsTenancyTest extends TestCase
}
}
/** @test */
public function predis_is_supported()
{
Config::set('database.redis.client', 'predis');
Config::set('tenancy.redis.multitenant', false);
// assert no exception is thrown from initializing tenancy
$this->assertNotNull($this->initTenancy());
}
/** @test */
public function predis_is_not_supported_without_disabling_redis_multitenancy()
{
Config::set('database.redis.client', 'predis');
// todo
$this->expectException(PhpRedisNotInstalledException::class);
$this->initTenancy();
}
/** @test */
public function filesystem_is_suffixed()
{