protected function MailhandlerCommentWebTest::testMailhandlerCommentUi in Mailhandler 8
Tests user interface of Mailhandler Comment plugin.
File
- mailhandler_comment/
src/ Tests/ MailhandlerCommentWebTest.php, line 57
Class
- MailhandlerCommentWebTest
- Tests the UI of Mailhandler Comment.
Namespace
Drupal\mailhandler_comment\TestsCode
protected function testMailhandlerCommentUi() {
$this
->drupalGet('admin/config/system/inmail/handlers');
$this
->assertText(t('Post comments via email'));
$this
->assertText(t('Comment'));
$mailhandler_comment_path = 'admin/config/system/inmail/handlers/mailhandler_comment';
$this
->drupalGet($mailhandler_comment_path);
$this
->assertText(t('Post comments via email'));
$this
->assertText('mailhandler_comment');
$this
->assertText(t('Select a referenced entity type.'));
$comment_entity_types = (array) $this
->xpath('//*[@id="edit-entity-type"]')[0]->option;
$this
->assertTrue(in_array('Content', $comment_entity_types));
}