mirror of
https://github.com/archtechx/tenancy.git
synced 2026-02-05 15:14:04 +00:00
Rename method to central
Signed-off-by: michael lundbøl <michael.lundboel@gmail.com>
This commit is contained in:
parent
e5700e7f72
commit
4ad4e3421d
2 changed files with 5 additions and 5 deletions
|
|
@ -89,7 +89,7 @@ class Tenancy
|
||||||
* @param callable $callback
|
* @param callable $callback
|
||||||
* @return mixed
|
* @return mixed
|
||||||
*/
|
*/
|
||||||
public function runGlobal(callable $callback)
|
public function central(callable $callback)
|
||||||
{
|
{
|
||||||
$oldTenant = $this->tenant;
|
$oldTenant = $this->tenant;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -73,7 +73,7 @@ class AutomaticModeTest extends TestCase
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @test */
|
/** @test */
|
||||||
public function running_the_global_tenancy_helper_with_tenant_already_initialized()
|
public function running_the_central_tenancy_helper_with_tenant_already_initialized()
|
||||||
{
|
{
|
||||||
MyBootstrapper::$revertedCallCount = 0;
|
MyBootstrapper::$revertedCallCount = 0;
|
||||||
GlobalRun::$count = 0;
|
GlobalRun::$count = 0;
|
||||||
|
|
@ -90,7 +90,7 @@ class AutomaticModeTest extends TestCase
|
||||||
|
|
||||||
$this->assertSame('acme', app('tenancy_initialized_for_tenant'));
|
$this->assertSame('acme', app('tenancy_initialized_for_tenant'));
|
||||||
|
|
||||||
tenancy()->runGlobal(function () {
|
tenancy()->central(function () {
|
||||||
GlobalRun::$count = 1;
|
GlobalRun::$count = 1;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -100,7 +100,7 @@ class AutomaticModeTest extends TestCase
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @test */
|
/** @test */
|
||||||
public function running_the_global_tenancy_helper_with_tenant_not_already_initialized()
|
public function running_the_central_tenancy_helper_with_tenant_not_already_initialized()
|
||||||
{
|
{
|
||||||
MyBootstrapper::$revertedCallCount = 0;
|
MyBootstrapper::$revertedCallCount = 0;
|
||||||
GlobalRun::$count = 0;
|
GlobalRun::$count = 0;
|
||||||
|
|
@ -109,7 +109,7 @@ class AutomaticModeTest extends TestCase
|
||||||
MyBootstrapper::class,
|
MyBootstrapper::class,
|
||||||
]]);
|
]]);
|
||||||
|
|
||||||
tenancy()->runGlobal(function () {
|
tenancy()->central(function () {
|
||||||
GlobalRun::$count = 1;
|
GlobalRun::$count = 1;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue