From c5ff9a0483d991dcca66580f2f1021ddee4e6608 Mon Sep 17 00:00:00 2001 From: Erik Amaru Ortiz Date: Mon, 30 Jun 2014 15:59:42 -0400 Subject: [PATCH] Updating Behat RestContext, sending logs to file stored in system temporal dir. --- features/bootstrap/RestContext.php | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/features/bootstrap/RestContext.php b/features/bootstrap/RestContext.php index 0f8f07ea2..c97378b79 100644 --- a/features/bootstrap/RestContext.php +++ b/features/bootstrap/RestContext.php @@ -1644,8 +1644,18 @@ class RestContext extends BehatContext file_put_contents($exportedProcessFileName, $this->_response->getBody(true)); - - + + } + /** + * @overrides + */ + public function printDebug($string) + { + //echo "\n\033[36m| " . strtr($string, array("\n" => "\n| ")) . "\033[0m\n\n"; + + $fp = fopen(sys_get_temp_dir() . "/behat.log", "a+"); + fwrite($fp, $string . PHP_EOL); + } } \ No newline at end of file