File tree Expand file tree Collapse file tree 1 file changed +46
-0
lines changed
packages/framework/tests/Unit Expand file tree Collapse file tree 1 file changed +46
-0
lines changed Original file line number Diff line number Diff line change @@ -71,6 +71,52 @@ public function testWithUnrelatedClass()
7171 );
7272 }
7373
74+ /**
75+ * @dataProvider blockquoteProvider
76+ */
77+ public function testItResolvesAllShortcodes (string $ input , string $ expectedOutput )
78+ {
79+ $ this ->assertSame ($ expectedOutput , ColoredBlockquotes::resolve ($ input ));
80+ }
81+
82+ public static function blockquoteProvider (): array
83+ {
84+ return [
85+ [
86+ '>danger This is a danger blockquote ' ,
87+ <<<'HTML'
88+ <blockquote class="danger">
89+ <p>This is a danger blockquote</p>
90+ </blockquote>
91+ HTML,
92+ ],
93+ [
94+ '>info This is an info blockquote ' ,
95+ <<<'HTML'
96+ <blockquote class="info">
97+ <p>This is an info blockquote</p>
98+ </blockquote>
99+ HTML,
100+ ],
101+ [
102+ '>success This is a success blockquote ' ,
103+ <<<'HTML'
104+ <blockquote class="success">
105+ <p>This is a success blockquote</p>
106+ </blockquote>
107+ HTML,
108+ ],
109+ [
110+ '>warning This is a warning blockquote ' ,
111+ <<<'HTML'
112+ <blockquote class="warning">
113+ <p>This is a warning blockquote</p>
114+ </blockquote>
115+ HTML,
116+ ],
117+ ];
118+ }
119+
74120 // Todo: Extract trait for this and MarkdownHeadingRendererUnitTest
75121 protected function createRealBladeCompilerEnvironment (): void
76122 {
You can’t perform that action at this time.
0 commit comments