diff --git a/core/tests/Drupal/Tests/Component/Utility/SafeMarkupTest.php b/core/tests/Drupal/Tests/Component/Utility/SafeMarkupTest.php index 7bda8e9..7ba686a 100644 --- a/core/tests/Drupal/Tests/Component/Utility/SafeMarkupTest.php +++ b/core/tests/Drupal/Tests/Component/Utility/SafeMarkupTest.php @@ -160,7 +160,7 @@ function providerCheckPlain() { * * @param string $string * The string to run through SafeMarkup::format(). - * @param string $args + * @param string[] $args * The arguments to pass into SafeMarkup::format(). * @param string $expected * The expected result from calling the function. @@ -169,10 +169,14 @@ function providerCheckPlain() { * @param bool $expected_is_safe * Whether the result is expected to be safe for HTML display. */ - function testFormat($string, $args, $expected, $message, $expected_is_safe) { + public function testFormat($string, array $args, $expected, $message, $expected_is_safe) { $result = SafeMarkup::format($string, $args); $this->assertEquals($expected, $result, $message); $this->assertEquals($expected_is_safe, SafeMarkup::isSafe($result), 'SafeMarkup::format correctly sets the result as safe or not safe.'); + + foreach ($args as $arg) { + $this->assertSame($arg instanceof SafeMarkupTestSafeString, SafeMarkup::isSafe($arg)); + } } /**