createMock(WPFunctions::class); $wpMock->method('escAttr')->will($this->returnArgument(0)); $this->paragraph = new Paragraph($wpMock); } public function testItShouldRenderParagraph() { $html = $this->paragraph->render([]); expect($html)->startsWith('paragraph->render([ 'params' => [ 'content' => 'Paragraph', ], ]); expect($html)->equals('

Paragraph

'); } public function testItShouldRenderClass() { $html = $this->paragraph->render([ 'params' => [ 'content' => 'Paragraph', 'class_name' => 'class1 class2', ], ]); expect($html)->equals('

Paragraph

'); } public function testItShouldRenderAlign() { $html = $this->paragraph->render([ 'params' => [ 'content' => 'Paragraph', 'align' => 'right', ], ]); expect($html)->equals('

Paragraph

'); } public function testItShouldRenderTextColor() { $html = $this->paragraph->render([ 'params' => [ 'content' => 'Paragraph', 'text_color' => 'red', ], ]); expect($html)->equals('

Paragraph

'); } public function testItShouldRenderBackgroundColor() { $html = $this->paragraph->render([ 'params' => [ 'content' => 'Paragraph', 'background_color' => 'red', ], ]); expect($html)->stringContainsString('style="background-color: red'); } public function testItShouldRenderFontSize() { $html = $this->paragraph->render([ 'params' => [ 'content' => 'Paragraph', 'font_size' => '33', ], ]); expect($html)->equals('

Paragraph

'); } public function testItShouldRenderLineHeight() { $html = $this->paragraph->render([ 'params' => [ 'content' => 'Paragraph', 'line_height' => '2.3', ], ]); expect($html)->equals('

Paragraph

'); } public function testItShouldRenderDropCap() { $html = $this->paragraph->render([ 'params' => [ 'content' => 'Paragraph', 'drop_cap' => '1', ], ]); expect($html)->equals('

Paragraph

'); } public function testItShouldRenderBackgroundClass() { $html = $this->paragraph->render([ 'params' => [ 'content' => 'Paragraph', 'background_color' => 'red', ], ]); expect($html)->stringContainsString('