From f1d7c669ce36115bffcfad0464b0fabb6114374c Mon Sep 17 00:00:00 2001 From: Awilum Date: Wed, 25 May 2022 12:13:11 +0300 Subject: [PATCH] feat(shortcodes): change parameter_value_delimiter format --- .../core/Entries/Directives/ShortcodesDirectiveTest.php | 6 +++--- .../core/Parsers/Shortcodes/StringsShortcodeTest.php | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/src/flextype/core/Entries/Directives/ShortcodesDirectiveTest.php b/tests/src/flextype/core/Entries/Directives/ShortcodesDirectiveTest.php index 52c7be9a..3c227921 100644 --- a/tests/src/flextype/core/Entries/Directives/ShortcodesDirectiveTest.php +++ b/tests/src/flextype/core/Entries/Directives/ShortcodesDirectiveTest.php @@ -11,14 +11,14 @@ afterEach(function (): void { }); test('shortcodes directive', function () { - entries()->create('shortcodes', ['foo' => '@shortcodes (strings prepend:"Hello ")World(/strings)']); + entries()->create('shortcodes', ['foo' => "@shortcodes (strings prepend:'Hello ')World(/strings)"]); $this->assertEquals('Hello World', entries()->fetch('shortcodes')['foo']); }); test('shortcodes directive disabled', function () { registry()->set('flextype.settings.entries.directives.shortcodes.enabled', false); - entries()->create('shortcodes', ['foo' => '@shortcodes (strings prepend:"Hello ")World(/strings)']); - $this->assertEquals('@shortcodes (strings prepend:"Hello ")World(/strings)', entries()->fetch('shortcodes')['foo']); + entries()->create('shortcodes', ['foo' => "@shortcodes (strings prepend:'Hello ')World(/strings)"]); + $this->assertEquals("@shortcodes (strings prepend:'Hello ')World(/strings)", entries()->fetch('shortcodes')['foo']); registry()->set('flextype.settings.entries.directives.shortcodes.enabled', true); }); \ No newline at end of file diff --git a/tests/src/flextype/core/Parsers/Shortcodes/StringsShortcodeTest.php b/tests/src/flextype/core/Parsers/Shortcodes/StringsShortcodeTest.php index 0e759060..c6592c57 100644 --- a/tests/src/flextype/core/Parsers/Shortcodes/StringsShortcodeTest.php +++ b/tests/src/flextype/core/Parsers/Shortcodes/StringsShortcodeTest.php @@ -5,7 +5,7 @@ declare(strict_types=1); test('(strings) shortcode', function () { // lower - $this->assertEquals("zed foo bar", "(strings lower)zed foo bar(/strings)"); + $this->assertEquals("zed foo bar", parsers()->shortcodes()->parse("(strings lower)zed foo bar(/strings)")); // upper $this->assertEquals("ZED FOO BAR", parsers()->shortcodes()->parse("(strings upper)zed foo bar(/strings)"));