Unverified Commit 00741504 authored by alexpott's avatar alexpott

Issue #2971145 by voleger: Fix naming of tests referencing the refactored...

Issue #2971145 by voleger: Fix naming of tests referencing the refactored drupal_set_message() function
parent 657cdcd1
......@@ -107,7 +107,7 @@ public function mainContentFallback() {
* @return string
* Empty string, we just test the setting of messages.
*/
public function drupalSetMessageTest() {
public function messengerServiceTest() {
// Set two messages.
$this->messenger->addStatus('First message (removed).');
$this->messenger->addStatus($this->t('Second message with <em>markup!</em> (not removed).'));
......
......@@ -13,11 +13,11 @@ system_test.main_content_handling:
requirements:
_access: 'TRUE'
system_test.drupal_set_message:
path: '/system-test/drupal-set-message'
system_test.messenger_service:
path: '/system-test/messenger-service'
defaults:
_title: 'Set messages with drupal_set_message()'
_controller: '\Drupal\system_test\Controller\SystemTestController::drupalSetMessageTest'
_title: 'Set messages with Messenger service'
_controller: '\Drupal\system_test\Controller\SystemTestController::messengerServiceTest'
requirements:
_access: 'TRUE'
......
......@@ -2,14 +2,15 @@
namespace Drupal\Tests\system\Functional\Bootstrap;
use Drupal\Core\Url;
use Drupal\Tests\BrowserTestBase;
/**
* Tests drupal_set_message() and related functions.
* Tests the Messenger service.
*
* @group Bootstrap
*/
class DrupalSetMessageTest extends BrowserTestBase {
class DrupalMessengerServiceTest extends BrowserTestBase {
/**
* Modules to enable.
......@@ -19,12 +20,12 @@ class DrupalSetMessageTest extends BrowserTestBase {
public static $modules = ['system_test'];
/**
* Tests drupal_set_message().
* Tests Messenger service.
*/
public function testDrupalSetMessage() {
// The page at system-test/drupal-set-message sets two messages and then
// removes the first before it is displayed.
$this->drupalGet('system-test/drupal-set-message');
public function testDrupalMessengerService() {
// The page at system_test.messenger_service route sets two messages and
// then removes the first before it is displayed.
$this->drupalGet(Url::fromRoute('system_test.messenger_service'));
$this->assertNoText('First message (removed).');
$this->assertRaw(t('Second message with <em>markup!</em> (not removed).'));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment