'container', 'columnLayout' => false, 'orientation' => 'vertical', 'blocks' => [ [ 'type' => 'text', 'text' => '

Thanks for reading. See you soon!

', ], [ 'type' => 'footer', 'text' => '

Unsubscribe
Add your postal address here!

', ], ], ], [ 'type' => 'header', 'link' => '', 'text' => 'http://some.url/wp-c\'">ontent/fake-logo.png', ], ]; public function _before() { parent::_before(); $this->sanitizer = $this->diContainer->get(ApiDataSanitizer::class); } public function testItSanitizesBody() { $result = $this->sanitizer->sanitizeBody($this->body); $container = $result[0]; $block1 = $container['blocks'][0]; $block2 = $container['blocks'][1]; expect($container['columnLayout'])->equals(false); expect($block1['type'])->equals('text'); expect($block1['text'])->equals('

Thanks for reading. See you soon!

'); expect($block2['type'])->equals('footer'); expect($block2['text'])->equals('

Unsubscribe
Add your postal address here!

'); $image = $result[1]; expect($image['type'])->equals('header'); expect($image['link'])->equals(''); expect($image['text'])->equals('http://some.url/wp-c\'">ontent/fake-logo.png'); } }