Skip to content
Snippets Groups Projects
Commit e420029e authored by catch's avatar catch
Browse files

Issue #3239292 by alexpott: Missing configuration in KernelTests causes deprecations in PHP 8.1

parent 3745a46a
No related branches found
No related tags found
No related merge requests found
......@@ -24,6 +24,7 @@ class AggregatorItemViewsFieldAccessTest extends FieldFieldAccessTestBase {
protected function setUp($import_test_views = TRUE): void {
parent::setUp($import_test_views);
$this->installConfig(['aggregator']);
$this->installEntitySchema('aggregator_feed');
$this->installEntitySchema('aggregator_item');
}
......
......@@ -58,6 +58,7 @@ class IntegrationTest extends ViewsKernelTestBase {
protected function setUp($import_test_views = TRUE): void {
parent::setUp();
$this->installConfig(['aggregator']);
$this->installEntitySchema('aggregator_item');
$this->installEntitySchema('aggregator_feed');
......
......@@ -26,6 +26,7 @@ class NewDefaultThemeBlocksTest extends KernelTestBase {
* Check the enabled Bartik blocks are correctly copied over.
*/
public function testNewDefaultThemeBlocks() {
$this->installConfig(['system']);
/** @var \Drupal\Core\Extension\ThemeInstallerInterface $theme_installer */
$theme_installer = $this->container->get('theme_installer');
$default_theme = $this->config('system.theme')->get('default');
......
......@@ -19,13 +19,14 @@ class CommentOrphanTest extends EntityKernelTestBase {
/**
* {@inheritdoc}
*/
protected static $modules = ['comment', 'node'];
protected static $modules = ['comment', 'node', 'user'];
/**
* {@inheritdoc}
*/
protected function setUp(): void {
parent::setUp();
$this->installConfig(['user']);
$this->installEntitySchema('date_format');
$this->installEntitySchema('comment');
$this->installSchema('comment', ['comment_entity_statistics']);
......
......@@ -81,6 +81,7 @@ public function userMailsProvider() {
* @dataProvider userMailsProvider
*/
public function testUserMailsSent($op, array $mail_keys) {
$this->installConfig('user');
$this->config('user.settings')->set('notify.' . $op, TRUE)->save();
$return = _user_mail_notify($op, $this->createUser());
$this->assertTrue($return);
......
......@@ -60,6 +60,7 @@ class ToolkitGdTest extends KernelTestBase {
protected function setUp(): void {
parent::setUp();
$this->installConfig(['system']);
// Set the image factory service.
$this->imageFactory = $this->container->get('image.factory');
}
......
......@@ -58,6 +58,7 @@ protected function setUp(): void {
parent::setUp();
$this->installSchema('system', ['sequences']);
$this->installConfig('system');
$this->pluginManager = $this->container->get('plugin.manager.condition');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment