public function testConstructor() { // Arrange $blockquote = new Blockquote('Something important.'); // Act $content = $blockquote->toMarkDown(); // Assert $this->assertSame('> Something important.' . PHP_EOL . PHP_EOL, $content); }
public function testRenderWithBoldStrongItalicEm() { $blockquote = Blockquote::create()->appendText(Bold::create()->appendText('Some'))->appendText(' text to be ')->appendText(Italic::create()->appendText('within'))->appendText(' a ')->appendText(Italic::create()->appendText('blockquote'))->appendText(' for ')->appendText(Bold::create()->appendText('testing.')); $expected = '<blockquote>' . '<b>Some</b> text to be <i>within</i> a <i>blockquote</i> for <b>testing.</b>' . '</blockquote>'; $rendered = $blockquote->render(); $this->assertEquals($expected, $rendered); }