1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2026-02-06 02:44:02 +00:00

Improve PHPUnit assertions

This commit is contained in:
peter279k 2020-11-29 02:13:52 +08:00
parent 126afcd0dd
commit ce0dee4343
5 changed files with 12 additions and 12 deletions

View file

@ -30,7 +30,7 @@ class GlobalCacheTest extends TestCase
/** @test */
public function global_cache_manager_stores_data_in_global_cache()
{
$this->assertSame(null, cache('foo'));
$this->assertNull(cache('foo'));
GlobalCache::put(['foo' => 'bar'], 1);
$this->assertSame('bar', GlobalCache::get('foo'));
@ -45,13 +45,13 @@ class GlobalCacheTest extends TestCase
tenancy()->end();
$this->assertSame('xyz', GlobalCache::get('abc'));
$this->assertSame('bar', GlobalCache::get('foo'));
$this->assertSame(null, cache('def'));
$this->assertNull(cache('def'));
$tenant2 = Tenant::create();
tenancy()->initialize($tenant2);
$this->assertSame('xyz', GlobalCache::get('abc'));
$this->assertSame('bar', GlobalCache::get('foo'));
$this->assertSame(null, cache('def'));
$this->assertNull(cache('def'));
cache(['def' => 'xxx'], 1);
$this->assertSame('xxx', cache('def'));