-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Fixes #56
- Loading branch information
Showing
3 changed files
with
41 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<?php | ||
|
||
namespace Drupal\Tests\message_subscribe\Functional; | ||
|
||
use Drupal\Core\Url; | ||
use Drupal\Tests\BrowserTestBase; | ||
|
||
/** | ||
* Tests menus for the message subscribe module. | ||
* | ||
* @group message_subscribe | ||
*/ | ||
class MenuTest extends BrowserTestBase { | ||
|
||
/** | ||
* {@inheritdoc} | ||
*/ | ||
public static $modules = ['message_subscribe']; | ||
|
||
/** | ||
* Test that the menu links are working properly. | ||
*/ | ||
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 subscribe settings')); | ||
|
||
// Link should be on the message-specific overview page. | ||
$this->drupalGet(Url::fromRoute('message.main_settings')); | ||
$this->assertSession()->linkExists(t('Message subscribe settings')); | ||
|
||
$this->clickLink(t('Message subscribe settings')); | ||
$this->assertSession()->statusCodeEquals(200); | ||
} | ||
|
||
} |