summaryrefslogtreecommitdiffstats
path: root/core/modules/aggregator/tests/src/Unit/Plugin
diff options
context:
space:
mode:
Diffstat (limited to 'core/modules/aggregator/tests/src/Unit/Plugin')
-rw-r--r--core/modules/aggregator/tests/src/Unit/Plugin/AggregatorPluginSettingsBaseTest.php14
1 files changed, 6 insertions, 8 deletions
diff --git a/core/modules/aggregator/tests/src/Unit/Plugin/AggregatorPluginSettingsBaseTest.php b/core/modules/aggregator/tests/src/Unit/Plugin/AggregatorPluginSettingsBaseTest.php
index 56c0339..ac2d579 100644
--- a/core/modules/aggregator/tests/src/Unit/Plugin/AggregatorPluginSettingsBaseTest.php
+++ b/core/modules/aggregator/tests/src/Unit/Plugin/AggregatorPluginSettingsBaseTest.php
@@ -4,6 +4,7 @@ namespace Drupal\Tests\aggregator\Unit\Plugin;
use Drupal\aggregator\Form\SettingsForm;
use Drupal\Core\Form\FormState;
+use Drupal\Core\Messenger\MessengerInterface;
use Drupal\Tests\UnitTestCase;
/**
@@ -55,6 +56,10 @@ class AggregatorPluginSettingsBaseTest extends UnitTestCase {
->will($this->returnValue(['aggregator_test' => ['title' => '', 'description' => '']]));
}
+ /** @var \Drupal\Core\Messenger\MessengerInterface|\PHPUnit_Framework_MockObject_MockBuilder $messenger */
+ $messenger = $this->createMock(MessengerInterface::class);
+ $messenger->expects($this->any())->method('addMessage');
+
$this->settingsForm = new SettingsForm(
$this->configFactory,
$this->managers['fetcher'],
@@ -62,6 +67,7 @@ class AggregatorPluginSettingsBaseTest extends UnitTestCase {
$this->managers['processor'],
$this->getStringTranslationStub()
);
+ $this->settingsForm->setMessenger($messenger);
}
/**
@@ -104,11 +110,3 @@ class AggregatorPluginSettingsBaseTest extends UnitTestCase {
}
}
-
-// @todo Delete after https://www.drupal.org/node/2278383 is in.
-namespace Drupal\Core\Form;
-
-if (!function_exists('drupal_set_message')) {
- function drupal_set_message() {
- }
-}