private function PotxTest::outputScreenContents in Translation template extractor 8
Debug functionality until simpletest built-in debugging is backported.
File
- tests/
src/ Kernel/ PotxTest.php, line 808
Class
- PotxTest
- Ensure that the translation template extractor functions properly.
Namespace
Drupal\Tests\potx\KernelCode
private function outputScreenContents($description = 'output', $basename = 'output') {
// This is a hack to get a directory that won't be cleaned up by simpletest.
$file_dir = file_directory_path() . '/../simpletest_output_pages';
if (!is_dir($file_dir)) {
mkdir($file_dir, 0777, TRUE);
}
$output_path = "{$file_dir}/{$basename}." . $this
->randomName(10) . '.html';
$rv = file_put_contents($output_path, $this
->drupalGetContent());
$this
->pass("{$description}: " . l(t('Contents of result page'), $output_path));
}