BUG Add a guard to prevent Behat runs from failing.

This commit is contained in:
Mateusz Uzdowski 2014-04-01 15:48:12 +13:00
parent 975e6bed56
commit 4d77dc6565

View File

@ -278,10 +278,12 @@ class TestSessionEnvironment extends Object {
} }
} }
file_put_contents( if (defined('JSON_PRETTY_PRINT')) {
$this->getFilePath(), $content = json_encode($state, JSON_PRETTY_PRINT);
json_encode($state, JSON_PRETTY_PRINT) } else {
); $content = json_encode($state);
}
file_put_contents($this->getFilePath(), $content);
$this->extend('onAfterApplyState'); $this->extend('onAfterApplyState');
} }