From 6779c055de2512bb37e52d74db1f770b853d43eb Mon Sep 17 00:00:00 2001 From: Awilum Date: Tue, 20 Oct 2020 00:25:27 +0300 Subject: [PATCH] feat(tests): add tests for Shortcode parse() method #477 --- tests/Support/Parsers/ShortcodeTest.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/Support/Parsers/ShortcodeTest.php b/tests/Support/Parsers/ShortcodeTest.php index 3cf9e726..3d3d4d0f 100644 --- a/tests/Support/Parsers/ShortcodeTest.php +++ b/tests/Support/Parsers/ShortcodeTest.php @@ -11,3 +11,9 @@ test('test getInstance() method', function () { test('test addEventHandler() method', function () { $this->assertInstanceOf(ShortcodeFacade::class, flextype('shortcode')->addHandler('foo', static function() { return ''; })); }); + +test('test parse() method', function () { + $this->assertInstanceOf(ShortcodeFacade::class, flextype('shortcode')->addHandler('bar', static function() { return ''; })); + $this->assertTrue(is_array(flextype('shortcode')->parse('[bar]'))); + $this->assertTrue(is_object(flextype('shortcode')->parse('[bar]')[0])); +});