1
0
mirror of https://github.com/flextype/flextype.git synced 2025-08-08 14:16:46 +02:00

feat(core): add test for getCacheID() entry #477

This commit is contained in:
Awilum
2020-10-17 16:14:52 +03:00
parent 1d1e1968f9
commit 010f1e4930

View File

@@ -94,3 +94,14 @@ test('test getDirectoryLocation entry', function () {
$this->assertStringContainsString('/foo',
flextype('entries')->getDirectoryLocation('foo'));
});
test('test getCacheID entry', function () {
flextype('entries')->create('foo', []);
$this->assertEquals('', flextype('entries')->getCacheID('foo'));
flextype('registry')->set('flextype.settings.cache.enabled', true);
flextype('entries')->create('bar', []);
$cache_id = flextype('entries')->getCacheID('bar');
$this->assertEquals(32, strlen($cache_id));
flextype('registry')->set('flextype.settings.cache.enabled', false);
});