1
0
mirror of https://github.com/flextype/flextype.git synced 2025-08-08 06:06:45 +02:00

feat(tests): add tests for Serializer Frontmatter getCacheID() #477

This commit is contained in:
Awilum
2020-10-21 10:50:47 +03:00
parent 6aad90d320
commit aa50b5a580

View File

@@ -15,3 +15,11 @@ test('test decode() method', function () {
flextype('frontmatter')
->decode("---\ntitle: Foo\n---\nBar"));
});
test('test getCacheID() method', function () {
$string = "---\ntitle: Foo\n---\nBar";
$cache_id = flextype('frontmatter')
->getCacheID($string);
$this->assertEquals(32, strlen($cache_id));
$this->assertNotEquals($string, $cache_id);
});