From ef38660f08633882b464fd08bdfd585a63018457 Mon Sep 17 00:00:00 2001 From: Franz Liedke Date: Thu, 5 Sep 2019 00:07:40 +0200 Subject: [PATCH] Fix failing test --- .../api/csrf_protection/RequireCsrfTokenTest.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/framework/core/tests/integration/api/csrf_protection/RequireCsrfTokenTest.php b/framework/core/tests/integration/api/csrf_protection/RequireCsrfTokenTest.php index 148a2774b..b275ad4d9 100644 --- a/framework/core/tests/integration/api/csrf_protection/RequireCsrfTokenTest.php +++ b/framework/core/tests/integration/api/csrf_protection/RequireCsrfTokenTest.php @@ -74,11 +74,11 @@ class RequireCsrfTokenTest extends TestCase // The response body should contain proper error details $body = (string) $response->getBody(); $this->assertJson($body); - $this->assertEquals([ - 'errors' => [ - ['status' => '400', 'code' => 'csrf_token_mismatch'], - ], - ], json_decode($body, true)); + + $json = json_decode($body, true); + $this->assertCount(1, $json['errors']); + $this->assertEquals('400', $json['errors'][0]['status']); + $this->assertEquals('csrf_token_mismatch', $json['errors'][0]['code']); } /**