From 4ad4e3421d6f7e596dbd2555290ddf55ebb1732e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?michael=20lundb=C3=B8l?= Date: Sat, 24 Oct 2020 16:14:45 +0200 Subject: [PATCH] Rename method to `central` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: michael lundbøl --- src/Tenancy.php | 2 +- tests/AutomaticModeTest.php | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) 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; });