mirror of
https://github.com/flextype/flextype.git
synced 2025-08-18 02:41:27 +02:00
feat(shortcodes): add ability to use markdown directive with markdown
shortcode
This commit is contained in:
@@ -2,7 +2,17 @@
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
test('[markdown] shortcode', function () {
|
||||
$this->assertEquals("<p><strong>Foo</strong></p>\n",
|
||||
parsers()->shortcodes()->parse('(markdown)**Foo**(/markdown)'));
|
||||
beforeEach(function() {
|
||||
filesystem()->directory(PATH['project'] . '/entries')->ensureExists(0755, true);
|
||||
});
|
||||
|
||||
afterEach(function () {
|
||||
filesystem()->directory(PATH['project'] . '/entries')->delete();
|
||||
});
|
||||
|
||||
test('markdown shortcode', function () {
|
||||
$this->assertEquals("<p><strong>Foo</strong></p>\n", parsers()->shortcodes()->parse('(markdown)**Foo**(/markdown)'));
|
||||
|
||||
expect(entries()->create('md', ['test' => '(markdown) **Foo**']))->toBeTrue();
|
||||
expect(entries()->fetch('md')['test'])->toBe("<p> <strong>Foo</strong></p>");
|
||||
});
|
||||
|
Reference in New Issue
Block a user