Issue #3218586 by mondrake: Missed one conversion to expectWarning()
(cherry picked from commit 88fa77b4ba
)
merge-requests/803/head
parent
e396c255f5
commit
fd932a2862
|
@ -7,7 +7,6 @@ use Drupal\Core\Render\Markup;
|
||||||
use Drupal\Tests\UnitTestCase;
|
use Drupal\Tests\UnitTestCase;
|
||||||
use Drupal\Core\Config\Config;
|
use Drupal\Core\Config\Config;
|
||||||
use Drupal\Core\Config\ConfigValueException;
|
use Drupal\Core\Config\ConfigValueException;
|
||||||
use PHPUnit\Framework\Error\Warning;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Tests the Config.
|
* Tests the Config.
|
||||||
|
@ -270,7 +269,12 @@ class ConfigTest extends UnitTestCase {
|
||||||
$this->config->set('testData', 1);
|
$this->config->set('testData', 1);
|
||||||
|
|
||||||
// Attempt to treat the single value as a nested item.
|
// 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);
|
$this->config->set('testData.illegalOffset', 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue