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:
@@ -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]));
|
||||
});
|
||||
|
Reference in New Issue
Block a user