'1',
'type' => 'columns',
];
public function _before() {
parent::_before();
$this->columns = new Columns();
$this->htmlParser = new HtmlParser();
}
public function testItShouldRenderColumns() {
$html = $this->columns->render($this->block, 'content');
expect($html)->equals('
content
');
}
public function testItShouldRenderVerticalAlignClass() {
$block = $this->block;
$block['params']['vertical_alignment'] = 'top';
$html = $this->columns->render($block, 'content');
$column = $this->htmlParser->getElementByXpath($html, '//div[1]');
$class = $this->htmlParser->getAttribute($column, 'class');
expect($class->textContent)->contains('mailpoet_vertically_align_top');
}
public function testItShouldRenderBackgroundColorClass() {
$block = $this->block;
$block['params']['background_color'] = 'vivid-red';
$html = $this->columns->render($block, 'content');
$column = $this->htmlParser->getElementByXpath($html, '//div[1]');
$class = $this->htmlParser->getAttribute($column, 'class');
expect($class->textContent)->contains('has-vivid-red-background-color');
expect($class->textContent)->contains('mailpoet_column_has_background');
}
public function testItShouldRenderTextColorClass() {
$block = $this->block;
$block['params']['text_color'] = 'vivid-cyan';
$html = $this->columns->render($block, 'content');
$column = $this->htmlParser->getElementByXpath($html, '//div[1]');
$class = $this->htmlParser->getAttribute($column, 'class');
expect($class->textContent)->contains('has-vivid-cyan-color');
}
}