diff -u b/core/tests/Drupal/Tests/Component/Utility/Stub/StubUnicode.php b/core/tests/Drupal/Tests/Component/Utility/Stub/StubUnicode.php --- b/core/tests/Drupal/Tests/Component/Utility/Stub/StubUnicode.php +++ b/core/tests/Drupal/Tests/Component/Utility/Stub/StubUnicode.php @@ -4,6 +4,7 @@ * @file * Contains \Drupal\Tests\Component\Utility\Stub\StubUnicode */ + namespace Drupal\Tests\Component\Utility\Stub; use Drupal\Component\Utility\Unicode; @@ -13,7 +14,6 @@ * * @see \Drupal\Tests\Component\Utility\Unicode */ - class StubUnicode extends Unicode { /** @@ -61,6 +61,9 @@ } } + /** + * {@inheritdoc} + */ public static function getPhpVersion() { return static::$currentPhpVersion; } diff -u b/core/tests/Drupal/Tests/Component/Utility/UnicodeTest.php b/core/tests/Drupal/Tests/Component/Utility/UnicodeTest.php --- b/core/tests/Drupal/Tests/Component/Utility/UnicodeTest.php +++ b/core/tests/Drupal/Tests/Component/Utility/UnicodeTest.php @@ -46,15 +46,17 @@ * @covers ::check */ public function testCheck($fake_php_version, $variable_name, $new_value, $passes_check) { - - // Save the current variable into a property so we can access it - // in StubUnicode::iniGet(). + // Save the current variable into a property so we can access it in + // StubUnicode::iniGet(). StubUnicode::$currentIniVariable = array( 'variable_name' => $variable_name, 'variable_value' => $new_value, ); + // Save the current PHP version into a property so we can access it in + // StubUnicode::getPhpVersion(). StubUnicode::$currentPhpVersion = $fake_php_version; + // Run the stub method to find out what it returns. $check = StubUnicode::check(); if ($passes_check) { @@ -66,10 +68,8 @@ // not successful. $this->assertEquals($check, $variable_name); } - } - /** * Data provider for testCheck(). *