You are here

private function PotxTestCase::outputScreenContents in Translation template extractor 7.3

Same name and namespace in other branches
  1. 6.3 tests/potx.test \PotxTestCase::outputScreenContents()
  2. 7 tests/potx.test \PotxTestCase::outputScreenContents()
  3. 7.2 tests/potx.test \PotxTestCase::outputScreenContents()

Debug functionality until simpletest built-in debugging is backported.

File

tests/potx.test, line 651
Tests to ensure that the template extractor works as intended.

Class

PotxTestCase
@file Tests to ensure that the template extractor works as intended.

Code

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('Contents of result page', $output_path));
}