Skip to content

Commit

Permalink
Reverting changes for alterableSchemaTest.
Browse files Browse the repository at this point in the history
  • Loading branch information
apathak18 committed Aug 2, 2024
1 parent dd9a986 commit b80535b
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions tests/src/Kernel/AlterableSchemaTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -114,18 +114,26 @@ 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 => [
'line' => 1,
'column' => 37,
],
],
'path' => [
'alterableQuery',
// Reference to our variable in the error.
'empty',
],
],
],
'data' => [
'alterableQuery' => NULL,
],
], json_decode($result->getContent(), TRUE));
}

Expand All @@ -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';
Expand Down

0 comments on commit b80535b

Please sign in to comment.