mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-13 01:44:04 +00:00
[3.x] DB users (#382)
* Initial draft * Apply fixes from StyleCI * Use CI on master branch too * Pass correct argument to queued DB creators/deleters * Apply fixes from StyleCI * Remove new interface from MySQLDBManager * Make phpunit run * Apply fixes from StyleCI * Fix static property * Default databaseName * Use database transactions for creating users & granting permissions * Apply fixes from StyleCI * Get old tests to pass * Apply fixes from StyleCI * Add tests for PermissionControlledMySQLDatabaseManager * Apply fixes from StyleCI * Write test for extra config, fix bug with extra config * Apply fixes from StyleCI
This commit is contained in:
parent
60665517a0
commit
3bb2759fe2
41 changed files with 756 additions and 286 deletions
|
|
@ -12,15 +12,9 @@ use Stancl\Tenancy\Tests\Etc\ExampleSeeder;
|
|||
|
||||
class CommandsTest extends TestCase
|
||||
{
|
||||
public $autoCreateTenant = true;
|
||||
public $autoInitTenancy = false;
|
||||
|
||||
public function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
config(['tenancy.migration_paths', [database_path('../migrations')]]);
|
||||
}
|
||||
|
||||
/** @test */
|
||||
public function migrate_command_doesnt_change_the_db_connection()
|
||||
{
|
||||
|
|
@ -173,6 +167,7 @@ class CommandsTest extends TestCase
|
|||
$tenant = tenancy()->all()[1]; // a tenant is autocreated prior to this
|
||||
$data = $tenant->data;
|
||||
unset($data['id']);
|
||||
unset($data['_tenancy_db_name']);
|
||||
|
||||
$this->assertSame(['plan' => 'free', 'email' => 'foo@test.local'], $data);
|
||||
$this->assertSame(['aaa.localhost', 'bbb.localhost'], $tenant->domains);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue