From 08f6db4ffe50b71b368deee60f6999d9ccff3115 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20=C5=A0tancl?= Date: Wed, 13 Feb 2019 18:15:22 +0100 Subject: [PATCH] Make tenancy()->init() statements more specific --- tests/CacheManagerTest.php | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/tests/CacheManagerTest.php b/tests/CacheManagerTest.php index f9fc6eff..047a1557 100644 --- a/tests/CacheManagerTest.php +++ b/tests/CacheManagerTest.php @@ -41,12 +41,14 @@ class CacheManagerTest extends TestCase /** @test */ public function tags_separate_cache_well_enough() { + tenant()->create('foo.localhost'); + tenancy()->init('foo.localhost'); cache()->put('foo', 'bar', 1); $this->assertSame('bar', cache()->get('foo')); - tenant()->create('foo.localhost'); - tenancy()->init(); + tenant()->create('bar.localhost'); + tenancy()->init('bar.localhost'); $this->assertNotSame('bar', cache()->get('foo')); @@ -58,12 +60,14 @@ class CacheManagerTest extends TestCase /** @test */ public function invoking_the_cache_helper_works() { + tenant()->create('foo.localhost'); + tenancy()->init('foo.localhost'); cache(['foo' => 'bar'], 1); $this->assertSame('bar', cache('foo')); - tenant()->create('foo.localhost'); - tenancy()->init(); + tenant()->create('bar.localhost'); + tenancy()->init('bar.localhost'); $this->assertNotSame('bar', cache('foo'));