Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

description param for dumpContentToFile()

(cherry picked from commit 5d92aa9)
  • Loading branch information...
commit f5f2518fec18baf662b1f6053dec01260fdc6c7d 1 parent 4c3ee5c
@benbuckman authored
Showing with 4 additions and 2 deletions.
  1. +4 −2 DrupalTestCase.class.php
View
6 DrupalTestCase.class.php
@@ -2368,8 +2368,10 @@ protected function drupalSetSettings($settings) {
* crude mechanism to dump current CURL'd html to file system
* dir set in phpunit.xml as DUMP_DIR.
* [tried and removed: create subdir for this test run and file for each dump]
+ *
+ * @param $description optional description of file dump for the logs
*/
- public function dumpContentToFile() {
+ public function dumpContentToFile($description = '') {
$dump_dir = isset($GLOBALS['DUMP_DIR']) ? $GLOBALS['DUMP_DIR'] : NULL;
if (empty($dump_dir) || !file_exists($dump_dir)) {
$this->error("Missing or invalid DUMP_DIR in " . __FUNCTION__);
@@ -2405,7 +2407,7 @@ public function dumpContentToFile() {
$put = file_put_contents($filepath, $this->drupalGetContent());
if ($put === FALSE) $this->error("Unable to dump content to $filepath.");
- else $this->verbose("Dumped content of " . $this->getUrl() . " to $filepath.");
+ else $this->verbose("Dumped content of " . $this->getUrl() . " to $filepath." . (empty($description) ? '' : " ($description)") );
}
Please sign in to comment.
Something went wrong with that request. Please try again.