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:
17
tests/Support/Parsers/Shortcodes/RawShortcodeTest.php
Normal file
17
tests/Support/Parsers/Shortcodes/RawShortcodeTest.php
Normal 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]'));
|
||||
});
|
Reference in New Issue
Block a user