diff --git a/core/lib/Drupal/Component/Yaml/Yaml.php b/core/lib/Drupal/Component/Yaml/Yaml.php index a632416..4272618 100644 --- a/core/lib/Drupal/Component/Yaml/Yaml.php +++ b/core/lib/Drupal/Component/Yaml/Yaml.php @@ -72,7 +72,7 @@ protected function determineImplementation() { static::$implementationClass = $class; } // If the PECL YAML extension installed, use that. - elseif (function_exists('yaml_emit')) { + elseif (extension_loaded('yaml_emit')) { static::$implementationClass = 'Drupal\Component\Yaml\Pecl'; } else { diff --git a/core/tests/Drupal/Tests/Component/Yaml/YamlTest.php b/core/tests/Drupal/Tests/Component/Yaml/YamlTest.php index b0af7f9..7129a73 100644 --- a/core/tests/Drupal/Tests/Component/Yaml/YamlTest.php +++ b/core/tests/Drupal/Tests/Component/Yaml/YamlTest.php @@ -29,9 +29,7 @@ public static function getInfo() { protected function setUp() { if (!extension_loaded('yaml')) { - $this->markTestSkipped( - 'The PECL Yaml extension is not available.' - ); + $this->markTestSkipped('The PECL Yaml extension is not available.'); } }