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 parse() method #477

This commit is contained in:
Awilum
2020-10-20 00:25:27 +03:00
parent 175b1f04ff
commit 6779c055de

View File

@@ -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]));
});