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

Fix Travis, add docs for generating HTTPS certificates (#19)

This commit is contained in:
Samuel Štancl 2019-02-07 15:26:42 +01:00 committed by GitHub
parent 0adbfee86e
commit 6bb18a2b95
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 108 additions and 7 deletions

View file

@ -2,6 +2,8 @@
namespace Stancl\Tenancy\Tests;
use Illuminate\Support\Facades\Redis;
class TestCase extends \Orchestra\Testbench\TestCase
{
/**
@ -13,7 +15,35 @@ class TestCase extends \Orchestra\Testbench\TestCase
{
parent::setUp();
//
Redis::connection('tenancy')->flushdb();
tenant()->create('localhost');
tenancy()->init('localhost');
}
/**
* Define environment setup.
*
* @param \Illuminate\Foundation\Application $app
* @return void
*/
protected function getEnvironmentSetUp($app)
{
$app['config']->set('database.redis.client', 'phpredis');
$app['config']->set('database.redis.tenancy', [
'host' => env('TENANCY_TEST_REDIS_HOST', '127.0.0.1'),
'password' => env('TENANCY_TEST_REDIS_PASSWORD', null),
'port' => env('TENANCY_TEST_REDIS_PORT', 6379),
// Use the #14 Redis database unless specified otherwise.
// Make sure you don't store anything in this db!
'database' => env('TENANCY_TEST_REDIS_DB', 14),
]);
$app['config']->set('tenancy.database', [
'based_on' => 'sqlite',
'prefix' => 'tenant',
'suffix' => '.sqlite',
]);
}
protected function getPackageProviders($app)