From 35912b84a0f439e35c51054491624d2af47ebcbd Mon Sep 17 00:00:00 2001 From: Awilum Date: Wed, 25 May 2022 18:01:09 +0300 Subject: [PATCH] feat(tests): add missed tests for `var` shortcode --- .../core/Parsers/Shortcodes/VarShortcodeTest.php | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 tests/src/flextype/core/Parsers/Shortcodes/VarShortcodeTest.php diff --git a/tests/src/flextype/core/Parsers/Shortcodes/VarShortcodeTest.php b/tests/src/flextype/core/Parsers/Shortcodes/VarShortcodeTest.php new file mode 100644 index 00000000..ce4c1802 --- /dev/null +++ b/tests/src/flextype/core/Parsers/Shortcodes/VarShortcodeTest.php @@ -0,0 +1,16 @@ +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'); +}); \ No newline at end of file