diff --git a/mailhandler_d8_demo/mailhandler_d8_demo.info.yml b/mailhandler_d8_demo/mailhandler_d8_demo.info.yml index 2a3662c..5a1fd77 100644 --- a/mailhandler_d8_demo/mailhandler_d8_demo.info.yml +++ b/mailhandler_d8_demo/mailhandler_d8_demo.info.yml @@ -6,3 +6,4 @@ version: 8.x-1.x core: 8.x dependencies: - inmail_demo + - mailhandler_d8 diff --git a/mailhandler_d8_demo/src/Tests/MailhandlerDemoWebTest.php b/mailhandler_d8_demo/src/Tests/MailhandlerDemoWebTest.php new file mode 100644 index 0000000..098d63d --- /dev/null +++ b/mailhandler_d8_demo/src/Tests/MailhandlerDemoWebTest.php @@ -0,0 +1,50 @@ +user = $this->drupalCreateUser([ + 'access administration pages', + 'administer inmail', + ]); + $this->drupalLogin($this->user); + } + + /** + * Tests user interface of Mailhandler Demo. + */ + protected function testMailhandlerDemoUi() { + $this->drupalGet('admin/config/system/inmail/paste'); + $sample_messages = (array) $this->xpath('//*[@id="edit-example"]')[0]->option; + + // Assert sample messages are available in the list of sample messages. + $this->assertTrue(in_array('PGP_Signed_MIME.eml', $sample_messages), 'PGP Signed MIME message is in the last of sample messages.'); + $this->assertTrue(in_array('PGP_Signed_MIME_HTML.eml', $sample_messages), 'PGP Signed MIME HTML message is in the last of sample messages.'); + $this->assertTrue(in_array('PGP_Signed_Inline.eml', $sample_messages), 'PGP Signed Inline message is in the last of sample messages.'); + } + +}