diff --git a/core/modules/system/src/Tests/Theme/ThemeTest.php b/core/modules/system/src/Tests/Theme/ThemeTest.php index 5503fea..7c1e83a 100644 --- a/core/modules/system/src/Tests/Theme/ThemeTest.php +++ b/core/modules/system/src/Tests/Theme/ThemeTest.php @@ -13,6 +13,7 @@ use Symfony\Cmf\Component\Routing\RouteObjectInterface; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\Routing\Route; +use Drupal\Component\Utility\SafeStringInterface; /** * Tests low-level theme functions. @@ -65,7 +66,7 @@ function testThemeDataTypes() { $foos = array('null' => NULL, 'false' => FALSE, 'integer' => 1, 'string' => 'foo'); foreach ($foos as $type => $example) { $output = \Drupal::theme()->render('theme_test_foo', array('foo' => $example)); - if (is_string($output)) { + if ($output === '') { $this->assertTrue(TRUE, format_string('\Drupal::theme() returns a string for data type !type.', array('!type' => $type))); } else { $this->assertTrue($output instanceof SafeStringInterface, format_string('\Drupal::theme() returns an object that implements SafeStringInterface for data type !type.', array('!type' => $type)));