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:
parent
0adbfee86e
commit
6bb18a2b95
8 changed files with 108 additions and 7 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue