Issue #3218586 by mondrake: Missed one conversion to expectWarning()

(cherry picked from commit 88fa77b4ba)
merge-requests/803/head
catch 2021-06-14 09:22:34 +01:00
parent e396c255f5
commit fd932a2862
1 changed files with 6 additions and 2 deletions

View File

@ -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);
}