Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorotwell committed Feb 12, 2019
1 parent 236f2b4 commit 98010da
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Illuminate/Foundation/Testing/TestResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -640,14 +640,14 @@ public function assertJsonValidationErrors($keys)
{
$keys = Arr::wrap($keys);

PHPUnit::assertNotEmpty($keys, 'You need to provide at least one expected key');
PHPUnit::assertNotEmpty($keys, 'No keys were provided.');

$errors = $this->json()['errors'] ?? [];

$errorMessage = $errors
? 'Response has the following JSON validation errors: '.
PHP_EOL.PHP_EOL.json_encode($errors, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE)
: 'Response does not have JSON validation errors';
? 'Response has the following JSON validation errors:'.
PHP_EOL.PHP_EOL.json_encode($errors, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE).PHP_EOL
: 'Response does not have JSON validation errors.';

foreach ($keys as $key) {
PHPUnit::assertArrayHasKey(
Expand Down

0 comments on commit 98010da

Please sign in to comment.