From fd932a2862adaf24e1bcc7e30229bc8bb97bb5a4 Mon Sep 17 00:00:00 2001 From: catch Date: Mon, 14 Jun 2021 09:22:34 +0100 Subject: [PATCH] Issue #3218586 by mondrake: Missed one conversion to expectWarning() (cherry picked from commit 88fa77b4ba0ddeafca473207649c9e95f132adb8) --- core/tests/Drupal/Tests/Core/Config/ConfigTest.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/core/tests/Drupal/Tests/Core/Config/ConfigTest.php b/core/tests/Drupal/Tests/Core/Config/ConfigTest.php index 2cfc1b32014..0fba72d8fc1 100644 --- a/core/tests/Drupal/Tests/Core/Config/ConfigTest.php +++ b/core/tests/Drupal/Tests/Core/Config/ConfigTest.php @@ -7,7 +7,6 @@ use Drupal\Core\Render\Markup; use Drupal\Tests\UnitTestCase; use Drupal\Core\Config\Config; use Drupal\Core\Config\ConfigValueException; -use PHPUnit\Framework\Error\Warning; /** * Tests the Config. @@ -270,7 +269,12 @@ class ConfigTest extends UnitTestCase { $this->config->set('testData', 1); // Attempt to treat the single value as a nested item. - $this->expectException(PHP_VERSION_ID >= 80000 ? \Error::class : Warning::class); + if (PHP_VERSION_ID >= 80000) { + $this->expectError(); + } + else { + $this->expectWarning(); + } $this->config->set('testData.illegalOffset', 1); }