Skip to content

Commit 8b2efa4

Browse files
committed
📦 Make tests a bit more restrictive and safe
1 parent 0a4e003 commit 8b2efa4

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tests/FunctionalTest.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -374,6 +374,7 @@ public function testNoLoginNoSessionQuery(): void
374374

375375
$result = json_decode($response->getContent(), true);
376376

377+
$this->assertIsArray($result);
377378
$this->assertArrayHasKey('errors', $result);
378379
$this->assertSame('Cannot query field "login" on type "Mutation".', $result['errors'][0]['message']);
379380
}
@@ -508,8 +509,11 @@ public function testWithIntrospection(): void
508509
$response = $kernel->handle($request);
509510

510511
$result = json_decode($response->getContent(), true);
512+
$this->assertIsArray($result);
513+
$this->assertArrayHasKey('data', $result);
511514
$data = $result['data'];
512515

516+
$this->assertIsArray($result);
513517
$this->assertArrayHasKey('__schema', $data);
514518
}
515519

0 commit comments

Comments
 (0)