Mercurial > hg > isophonics-drupal-site
comparison core/tests/Drupal/Tests/Component/Render/PlainTextOutputTest.php @ 17:129ea1e6d783
Update, including to Drupal core 8.6.10
author | Chris Cannam |
---|---|
date | Thu, 28 Feb 2019 13:21:36 +0000 |
parents | 4c8ae668cc8c |
children |
comparison
equal
deleted
inserted
replaced
16:c2387f117808 | 17:129ea1e6d783 |
---|---|
1 <?php | 1 <?php |
2 | 2 |
3 namespace Drupal\Tests\Component\Render; | 3 namespace Drupal\Tests\Component\Render; |
4 | 4 |
5 use Drupal\Component\Render\PlainTextOutput; | 5 use Drupal\Component\Render\PlainTextOutput; |
6 use Drupal\Component\Utility\SafeMarkup; | 6 use Drupal\Component\Render\FormattableMarkup; |
7 use Drupal\Component\Render\MarkupInterface; | 7 use Drupal\Component\Render\MarkupInterface; |
8 use PHPUnit\Framework\TestCase; | 8 use PHPUnit\Framework\TestCase; |
9 | 9 |
10 /** | 10 /** |
11 * @coversDefaultClass \Drupal\Component\Render\PlainTextOutput | 11 * @coversDefaultClass \Drupal\Component\Render\PlainTextOutput |
26 * | 26 * |
27 * @covers ::renderFromHtml | 27 * @covers ::renderFromHtml |
28 * @dataProvider providerRenderFromHtml | 28 * @dataProvider providerRenderFromHtml |
29 */ | 29 */ |
30 public function testRenderFromHtml($expected, $string, $args = []) { | 30 public function testRenderFromHtml($expected, $string, $args = []) { |
31 $markup = SafeMarkup::format($string, $args); | 31 $markup = new FormattableMarkup($string, $args); |
32 $output = PlainTextOutput::renderFromHtml($markup); | 32 $output = PlainTextOutput::renderFromHtml($markup); |
33 $this->assertSame($expected, $output); | 33 $this->assertSame($expected, $output); |
34 } | 34 } |
35 | 35 |
36 /** | 36 /** |