From b80535b140ae454acfa7430f86560732439a44c8 Mon Sep 17 00:00:00 2001 From: Ankit Pathak Date: Fri, 2 Aug 2024 17:26:25 +0530 Subject: [PATCH] Reverting changes for alterableSchemaTest. --- tests/src/Kernel/AlterableSchemaTest.php | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/tests/src/Kernel/AlterableSchemaTest.php b/tests/src/Kernel/AlterableSchemaTest.php index c77c4aaa5..961e46645 100644 --- a/tests/src/Kernel/AlterableSchemaTest.php +++ b/tests/src/Kernel/AlterableSchemaTest.php @@ -114,9 +114,9 @@ public function testEmptySchemaExtensionAlteredQueryResultPropertyAdded(): void $this->assertSame([ 'errors' => [ 0 => [ - 'message' => 'Cannot query field "empty" on type "Result".', + 'message' => 'Internal server error', 'extensions' => [ - 'category' => 'graphql', + 'category' => 'internal', ], 'locations' => [ 0 => [ @@ -124,8 +124,16 @@ public function testEmptySchemaExtensionAlteredQueryResultPropertyAdded(): void 'column' => 37, ], ], + 'path' => [ + 'alterableQuery', + // Reference to our variable in the error. + 'empty', + ], ], ], + 'data' => [ + 'alterableQuery' => NULL, + ], ], json_decode($result->getContent(), TRUE)); } @@ -146,6 +154,7 @@ protected function mockSchema($id, $schema, array $extensions = []): void { $extensions['graphql_alterable_schema_test']->expects(static::any()) ->method('getBaseDefinition') ->willReturn(''); + // Different extension definition for different tests. // PHPUnit compatibility: remove once support for Drupal 10.2 is dropped. $methodName = method_exists($this, 'name') ? 'name' : 'getName';