Render form block custom classes on frontend
[MAILPOET-2746]
This commit is contained in:
committed by
Veljko V
parent
72a0afa75b
commit
060a6839c7
@ -10,9 +10,9 @@ class HtmlTest extends \MailPoetUnitTest {
|
||||
private $html;
|
||||
|
||||
private $block = [
|
||||
'type' => 'divider',
|
||||
'name' => 'Divider',
|
||||
'id' => 'divider',
|
||||
'type' => 'html',
|
||||
'name' => 'Html',
|
||||
'id' => 'html',
|
||||
'unique' => '1',
|
||||
'static' => '0',
|
||||
'params' => [
|
||||
@ -32,6 +32,13 @@ class HtmlTest extends \MailPoetUnitTest {
|
||||
expect($html)->equals("<div class=\"mailpoet_paragraph\" >line1<br />\nline2</div>");
|
||||
}
|
||||
|
||||
public function testItShouldRenderCustomClass() {
|
||||
$block = $this->block;
|
||||
$block['params']['class_name'] = 'my_class';
|
||||
$html = $this->html->render($block, []);
|
||||
expect($html)->equals("<div class=\"mailpoet_paragraph my_class\" >line1<br />\nline2</div>");
|
||||
}
|
||||
|
||||
public function testItShouldRenderCustomHtmlWithoutAutomaticBrs() {
|
||||
$block = $this->block;
|
||||
$block['params']['nl2br'] = '';
|
||||
|
Reference in New Issue
Block a user