mirror of
https://github.com/archtechx/tenancy.git
synced 2026-02-04 19:04:03 +00:00
add data type tests
This commit is contained in:
parent
0176579e80
commit
643936dd22
1 changed files with 16 additions and 0 deletions
|
|
@ -124,4 +124,20 @@ class TenantStorageTest extends TestCase
|
||||||
$this->assertSame('RedisStorageDriver', class_basename(tenancy()->storage));
|
$this->assertSame('RedisStorageDriver', class_basename(tenancy()->storage));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** @test */
|
||||||
|
public function data_is_stored_with_correct_data_types()
|
||||||
|
{
|
||||||
|
tenancy()->put('someBool', false);
|
||||||
|
$this->assertSame('boolean', gettype(tenancy()->get('someBool')));
|
||||||
|
|
||||||
|
tenancy()->put('someInt', 5);
|
||||||
|
$this->assertSame('integer', gettype(tenancy()->get('someInt')));
|
||||||
|
|
||||||
|
tenancy()->put('someDouble', 11.40);
|
||||||
|
$this->assertSame('double', gettype(tenancy()->get('someDouble')));
|
||||||
|
|
||||||
|
tenancy()->put('string', 'foo');
|
||||||
|
$this->assertSame('string', gettype(tenancy()->get('string')));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue