public function MenuTest::testMenuLinks in Message 8
Test that the menu links are working properly.
File
- tests/
src/ Functional/ MenuTest.php, line 30
Class
- MenuTest
- Tests admin menus for the message module.
Namespace
Drupal\Tests\message\FunctionalCode
public function testMenuLinks() {
$admin = $this
->drupalCreateUser([], NULL, TRUE);
$this
->drupalLogin($admin);
// Link should appear on main config page.
$this
->drupalGet(Url::fromRoute('system.admin_config'));
$this
->assertSession()
->linkExists(t('Message'));
// Link should be on the message-specific overview page.
$this
->drupalGet(Url::fromRoute('message.main_settings'));
$this
->assertSession()
->linkExists(t('Message'));
$this
->clickLink(t('Message'));
$this
->assertSession()
->statusCodeEquals(200);
}