1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2025-12-12 12:54:05 +00:00

Fix bug with JSON encoding

This commit is contained in:
Samuel Štancl 2019-08-19 10:55:48 +02:00
parent 8456280ac4
commit 314b2d3003
2 changed files with 37 additions and 5 deletions

View file

@ -148,4 +148,20 @@ class TenantStorageTest extends TestCase
config(['tenancy.storage.db.connection' => 'foo']);
$this->assertSame('foo', (new Tenant)->getConnectionName());
}
/** @test */
public function retrieving_data_without_cache_works()
{
tenant()->create('foo.localhost');
tenancy()->init('foo.localhost');
tenancy()->put('foo', 'bar');
$this->assertSame('bar', tenancy()->get('foo'));
$this->assertSame(['bar'], tenancy()->get(['foo']));
tenancy()->end();
tenancy()->init('foo.localhost');
$this->assertSame('bar', tenancy()->get('foo'));
$this->assertSame(['bar'], tenancy()->get(['foo']));
}
}