'footer', 'text' => '
Footer text. link
', 'styles' => [ 'block' => [ 'backgroundColor' => 'transparent', ], 'text' => [ 'fontColor' => '#222222', 'fontFamily' => 'Roboto', 'fontSize' => '12px', 'textAlign' => 'center', ], 'link' => [ 'fontColor' => '#689f2c', 'textDecoration' => 'none', ], ], ]; public function testItRendersCorrectly() { $output = (new Footer)->render($this->block); $expectedResult = 'Footer text. link
'; $output = (new Footer)->render($this->block); expect($output)->stringContainsString('link'); } public function testItRaisesExceptionIfTextIsNotString() { $this->block['text'] = ['some', 'array']; $this->expectException('RuntimeException'); (new Footer)->render($this->block); } }