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

feat(tests): add tests for Shortcode raw #477

This commit is contained in:
Awilum
2020-10-20 22:53:44 +03:00
parent 0a2fc5c46e
commit 3f115d3442

View File

@@ -0,0 +1,17 @@
<?php
declare(strict_types=1);
beforeEach(function() {
filesystem()->directory(PATH['project'] . '/entries')->create();
});
afterEach(function (): void {
filesystem()->directory(PATH['project'] . '/entries')->delete();
});
test('test raw shortcode', function () {
$this->assertTrue(flextype('entries')->create('foo', ['title' => 'Foo']));
$this->assertEquals('[entries_fetch id="foo" field="title"]',
flextype('shortcode')->process('[raw][entries_fetch id="foo" field="title"][/raw]'));
});