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

feat(tests): add missed tests for var shortcode

This commit is contained in:
Awilum
2022-05-25 18:01:09 +03:00
parent c2e3175c65
commit 35912b84a0

View File

@@ -0,0 +1,16 @@
<?php
declare(strict_types=1);
beforeEach(function() {
filesystem()->directory(PATH['project'] . '/entries')->ensureExists(0755, true);
});
afterEach(function () {
filesystem()->directory(PATH['project'] . '/entries')->delete();
});
test('var shortcode', function () {
expect(entries()->create('foo', ['var' => ['foo' => 'Foo'], 'title' => '(var:foo)']))->toBeTrue();
expect(entries()->fetch('foo')['title'])->toBe('Foo');
});