'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 '; expect($output)->equals($expectedResult); } public function testItRendersWithBackgroundColor() { $this->block['styles']['block']['backgroundColor'] = '#f0f0f0'; $output = (new Footer)->render($this->block); $expectedResult = ' Footer text. link '; expect($output)->equals($expectedResult); } public function testItPrefersInlinedCssForLinks() { $this->block['text'] = '

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); } }