Mercurial > hg > isophonics-drupal-site
diff core/tests/Drupal/KernelTests/Component/Utility/SafeMarkupKernelTest.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 |
line wrap: on
line diff
--- a/core/tests/Drupal/KernelTests/Component/Utility/SafeMarkupKernelTest.php Tue Jul 10 15:07:59 2018 +0100 +++ b/core/tests/Drupal/KernelTests/Component/Utility/SafeMarkupKernelTest.php Thu Feb 28 13:21:36 2019 +0000 @@ -2,7 +2,7 @@ namespace Drupal\KernelTests\Component\Utility; -use Drupal\Component\Utility\SafeMarkup; +use Drupal\Component\Render\FormattableMarkup; use Drupal\Core\Url; use Drupal\KernelTests\KernelTestBase; @@ -28,7 +28,7 @@ } /** - * Gets arguments for SafeMarkup::format() based on Url::fromUri() parameters. + * Gets arguments for FormattableMarkup based on Url::fromUri() parameters. * * @param string $uri * The URI of the resource. @@ -38,6 +38,8 @@ * @return array * Array containing: * - ':url': A URL string. + * + * @see \Drupal\Component\Render\FormattableMarkup */ protected static function getSafeMarkupUriArgs($uri, $options = []) { $args[':url'] = Url::fromUri($uri, $options)->toString(); @@ -45,13 +47,13 @@ } /** - * Tests URL ":placeholders" in SafeMarkup::format(). + * Tests URL ":placeholders" in \Drupal\Component\Render\FormattableMarkup. * * @dataProvider providerTestSafeMarkupUri */ public function testSafeMarkupUri($string, $uri, $options, $expected) { $args = self::getSafeMarkupUriArgs($uri, $options); - $this->assertEquals($expected, SafeMarkup::format($string, $args)); + $this->assertEquals($expected, new FormattableMarkup($string, $args)); } /** @@ -113,7 +115,7 @@ $this->setExpectedException(\InvalidArgumentException::class); $args = self::getSafeMarkupUriArgs($uri); - SafeMarkup::format($string, $args); + new FormattableMarkup($string, $args); } /**
