diff --git a/src/Tenancy.php b/src/Tenancy.php index 2ecb923e..e42415ec 100644 --- a/src/Tenancy.php +++ b/src/Tenancy.php @@ -89,7 +89,7 @@ class Tenancy * @param callable $callback * @return mixed */ - public function runGlobal(callable $callback) + public function central(callable $callback) { $oldTenant = $this->tenant; diff --git a/tests/AutomaticModeTest.php b/tests/AutomaticModeTest.php index 06bc789f..2371fb75 100644 --- a/tests/AutomaticModeTest.php +++ b/tests/AutomaticModeTest.php @@ -73,7 +73,7 @@ class AutomaticModeTest extends TestCase } /** @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; GlobalRun::$count = 0; @@ -90,7 +90,7 @@ class AutomaticModeTest extends TestCase $this->assertSame('acme', app('tenancy_initialized_for_tenant')); - tenancy()->runGlobal(function () { + tenancy()->central(function () { GlobalRun::$count = 1; }); @@ -100,7 +100,7 @@ class AutomaticModeTest extends TestCase } /** @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; GlobalRun::$count = 0; @@ -109,7 +109,7 @@ class AutomaticModeTest extends TestCase MyBootstrapper::class, ]]); - tenancy()->runGlobal(function () { + tenancy()->central(function () { GlobalRun::$count = 1; });