Chris@0: assertSame($expected, $output); Chris@0: } Chris@0: Chris@0: /** Chris@0: * Data provider for ::testRenderFromHtml() Chris@0: */ Chris@0: public function providerRenderFromHtml() { Chris@0: $data = []; Chris@0: Chris@0: $data['simple-text'] = ['Giraffes and wombats', 'Giraffes and wombats']; Chris@0: $data['simple-html'] = ['Giraffes and wombats', 'Giraffes and wombats']; Chris@0: $data['html-with-quote'] = ['Giraffes and quote"s', 'Giraffes and quote"s']; Chris@0: Chris@0: $expected = 'The tag makes your text look like "this".'; Chris@0: $string = 'The <em> tag makes your text look like "this".'; Chris@0: $data['escaped-html-with-quotes'] = [$expected, $string]; Chris@0: Chris@0: $safe_string = $this->prophesize(MarkupInterface::class); Chris@0: $safe_string->__toString()->willReturn('"this"'); Chris@0: $safe_string = $safe_string->reveal(); Chris@0: $data['escaped-html-with-quotes-and-placeholders'] = [$expected, 'The @tag tag makes your text look like @result.', ['@tag' => '', '@result' => $safe_string]]; Chris@0: Chris@0: $safe_string = $this->prophesize(MarkupInterface::class); Chris@0: $safe_string->__toString()->willReturn($string); Chris@0: $safe_string = $safe_string->reveal(); Chris@0: $data['safe-string'] = [$expected, $safe_string]; Chris@0: Chris@0: return $data; Chris@0: } Chris@0: Chris@0: }