mirror of
https://github.com/archtechx/tenancy.git
synced 2026-02-05 16:54:05 +00:00
Regression test w/ markTestIncomplete()
This commit is contained in:
parent
c01c40e715
commit
7ea6d24b89
2 changed files with 18 additions and 1 deletions
|
|
@ -52,8 +52,8 @@ class DatabaseManager
|
||||||
{
|
{
|
||||||
// Opposite order to connect() because we don't
|
// Opposite order to connect() because we don't
|
||||||
// want to ever purge the central connection
|
// want to ever purge the central connection
|
||||||
$this->switchConnection($this->originalDefaultConnectionName);
|
|
||||||
$this->setDefaultConnection($this->originalDefaultConnectionName);
|
$this->setDefaultConnection($this->originalDefaultConnectionName);
|
||||||
|
$this->switchConnection($this->originalDefaultConnectionName);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -45,4 +45,21 @@ class DatabaseManagerTest extends TestCase
|
||||||
$this->assertSame('tenant', config('database.default'));
|
$this->assertSame('tenant', config('database.default'));
|
||||||
$this->assertSame('bar', config('database.connections.' . config('database.default') . '.foo'));
|
$this->assertSame('bar', config('database.connections.' . config('database.default') . '.foo'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** @test */
|
||||||
|
public function ending_tenancy_doesnt_purge_the_central_connection()
|
||||||
|
{
|
||||||
|
$this->markTestIncomplete('Seems like this only happens on MySQL?');
|
||||||
|
|
||||||
|
// regression test for https://github.com/stancl/tenancy/pull/189
|
||||||
|
// config(['tenancy.migrate_after_creation' => true]);
|
||||||
|
|
||||||
|
tenancy()->create(['foo.localhost']);
|
||||||
|
tenancy()->init('foo.localhost');
|
||||||
|
tenancy()->end();
|
||||||
|
|
||||||
|
$this->assertNotEmpty(tenancy()->all());
|
||||||
|
|
||||||
|
tenancy()->all()->each->delete();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue