Skip to content

Commit

Permalink
Test it resolves all shortcodes
Browse files Browse the repository at this point in the history
  • Loading branch information
caendesilva committed Dec 6, 2024
1 parent eefb2b6 commit 186d55e
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions packages/framework/tests/Unit/ColoredBlockquoteShortcodesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,52 @@ public function testWithUnrelatedClass()
);
}

/**
* @dataProvider blockquoteProvider
*/
public function testItResolvesAllShortcodes(string $input, string $expectedOutput)
{
$this->assertSame($expectedOutput, ColoredBlockquotes::resolve($input));
}

public static function blockquoteProvider(): array
{
return [
[
'>danger This is a danger blockquote',
<<<'HTML'
<blockquote class="danger">
<p>This is a danger blockquote</p>
</blockquote>
HTML,
],
[
'>info This is an info blockquote',
<<<'HTML'
<blockquote class="info">
<p>This is an info blockquote</p>
</blockquote>
HTML,
],
[
'>success This is a success blockquote',
<<<'HTML'
<blockquote class="success">
<p>This is a success blockquote</p>
</blockquote>
HTML,
],
[
'>warning This is a warning blockquote',
<<<'HTML'
<blockquote class="warning">
<p>This is a warning blockquote</p>
</blockquote>
HTML,
],
];
}

// Todo: Extract trait for this and MarkdownHeadingRendererUnitTest
protected function createRealBladeCompilerEnvironment(): void
{
Expand Down

0 comments on commit 186d55e

Please sign in to comment.