MenuTest.php in Message Subscribe 8
File
tests/src/Functional/MenuTest.php
View source
<?php
namespace Drupal\Tests\message_subscribe\Functional;
use Drupal\Core\Url;
use Drupal\Tests\BrowserTestBase;
class MenuTest extends BrowserTestBase {
public static $modules = [
'message_subscribe',
];
public function testMenuLinks() {
$admin = $this
->drupalCreateUser([], NULL, TRUE);
$this
->drupalLogin($admin);
$this
->drupalGet(Url::fromRoute('system.admin_config'));
$this
->assertSession()
->linkExists(t('Message subscribe settings'));
$this
->drupalGet(Url::fromRoute('message.main_settings'));
$this
->assertSession()
->linkExists(t('Message subscribe settings'));
$this
->clickLink(t('Message subscribe settings'));
$this
->assertSession()
->statusCodeEquals(200);
}
}
Classes
Name |
Description |
MenuTest |
Tests menus for the message subscribe module. |