public function MailhandlerCommentTest::getFileContent in Mailhandler 8
Returns the content of a requested file.
See \Drupal\Tests\inmail\Kernel\ModeratorForwardTest.
Parameters
string $filename: The name of the file.
Return value
string The content of the file.
2 calls to MailhandlerCommentTest::getFileContent()
- MailhandlerCommentTest::testMailhandlerCommentPluginAnonymous in mailhandler_comment/
tests/ src/ Kernel/ MailhandlerCommentTest.php - Tests features of Mailhandler Comment plugin for anonymous users.
- MailhandlerCommentTest::testMailhandlerCommentPluginAuthenticated in mailhandler_comment/
tests/ src/ Kernel/ MailhandlerCommentTest.php - Tests features of Mailhandler Comment plugin for authenticated users.
File
- mailhandler_comment/
tests/ src/ Kernel/ MailhandlerCommentTest.php, line 173
Class
- MailhandlerCommentTest
- Tests the Comment handler plugin.
Namespace
Drupal\Tests\mailhandler_comment\KernelCode
public function getFileContent($filename) {
$path = drupal_get_path('module', 'mailhandler_comment') . '/tests/' . $filename;
return file_get_contents(DRUPAL_ROOT . '/' . $path);
}