public function AnalyzerTestBase::getFileContent in Mailhandler 8
Returns the content of a requested file.
Parameters
string $filename: The name of the file.
Return value
string The content of the file.
5 calls to AnalyzerTestBase::getFileContent()
- BodyAnalyzerKernelTest::testBodyAnalyzer in tests/
src/ Kernel/ BodyAnalyzerKernelTest.php - Tests features of Body Analyzer plugin.
- EntityTypeAnalyzerKernelTest::testEntityTypeAnalyzer in tests/
src/ Kernel/ EntityTypeAnalyzerKernelTest.php - Tests features of Entity Type Analyzer plugin.
- FooterAnalyzerKernelTest::testFooterAnalyzer in tests/
src/ Kernel/ FooterAnalyzerKernelTest.php - Tests features of Footer Analyzer plugin.
- PGPAnalyzerKernelTest::testPGAnalyzer in tests/
src/ Kernel/ PGPAnalyzerKernelTest.php - Tests features of PGP Analyzer plugin.
- SenderAnalyzerKernelTest::testSenderAnalyzer in tests/
src/ Kernel/ SenderAnalyzerKernelTest.php - Tests features of Sender Analyzer plugin.
File
- tests/
src/ Kernel/ AnalyzerTestBase.php, line 62
Class
- AnalyzerTestBase
- Provides the base for analyzer tests.
Namespace
Drupal\Tests\mailhandler\KernelCode
public function getFileContent($filename) {
$path = drupal_get_path('module', 'mailhandler') . '/tests/' . $filename;
return file_get_contents(DRUPAL_ROOT . '/' . $path);
}