diff options
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/_support/Helper/Jsonapi.php | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/tests/_support/Helper/Jsonapi.php b/tests/_support/Helper/Jsonapi.php index 93750d9..81d112c 100644 --- a/tests/_support/Helper/Jsonapi.php +++ b/tests/_support/Helper/Jsonapi.php @@ -206,9 +206,7 @@ class Jsonapi extends \Codeception\Module $json = json_encode($jsonBody, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES); // This converts the default indentation of 4 spaces to 2 spaces - $json = preg_replace_callback('/^( +)(?=\S)/m', function ($match) { - return str_pad('', strlen($match[1]) / 2, ' '); - }, $json); + $json = preg_replace('/^( +)\1/m', '$1', $json); $dirname = codecept_output_dir() . 'json-for-slate/'; if (!file_exists($dirname)) { |
