From 26febafe7f2daa31ea284e8c7e9f92d58f5e75f4 Mon Sep 17 00:00:00 2001 From: Daniel Bosen Date: Tue, 21 Nov 2023 17:40:18 +0100 Subject: [PATCH] Test only --- .../tests/src/Functional/SchemaTest.php | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/modules/thunder_gqls/tests/src/Functional/SchemaTest.php b/modules/thunder_gqls/tests/src/Functional/SchemaTest.php index 8f17f8c55..ebefb07e3 100644 --- a/modules/thunder_gqls/tests/src/Functional/SchemaTest.php +++ b/modules/thunder_gqls/tests/src/Functional/SchemaTest.php @@ -141,6 +141,28 @@ public function testExpiredImage(): void { ], $this->jsonDecode($response->getBody())['data']['page']); } + /** + * Validates that non-existing entity links do not generate a warning. + */ + public function testNonExistingEntityLinks(): void { + $query = << 'news']; + $response = $this->query($query, Json::encode($variables)); + $page = $this->jsonDecode($response->getBody()); + $this->assertArrayNotHasKey('errors', $page); + $this->assertNull($page['data']['page']['entityLinks']['versionHistory']); + + } + /** * Validates the thunder schema. */