'header', 'text' => 'View this in your browser.', 'styles' => [ 'block' => [ 'backgroundColor' => 'transparent', ], 'text' => [ 'fontColor' => '#222222', 'fontFamily' => 'Arial', 'fontSize' => '12px', 'textAlign' => 'left', ], 'link' => [ 'fontColor' => '#6cb7d4', 'textDecoration' => 'underline', ], ], ]; public function testItRendersCorrectly() { $output = (new Header)->render($this->block); $expectedResult = ' View this in your browser. '; expect($output)->equals($expectedResult); } public function testItRendersBackgroundColorCorrectly() { $this->block['styles']['block']['backgroundColor'] = '#f0f0f0'; $output = (new Header)->render($this->block); $expectedResult = ' View this in your browser. '; expect($output)->equals($expectedResult); } public function testItPrefersInlinedCssForLinks() { $this->block['text'] = '

Header text. link

'; $output = (new Footer)->render($this->block); expect($output)->stringContainsString('link'); } public function testItRaisesExceptionIfTextIsNotString() { $this->block['text'] = ['some', 'array']; $this->expectException('RuntimeException'); (new Header)->render($this->block); } }