We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
@@ -26,67 +26,3 @@ |
||
26 | 26 | $this->assertSame([['node' => ['username' => 'user1']]], $result['data']['users']['edges']); |
27 | 27 | |
28 | 28 | $query = <<<'EOF' |
29 | - mutation M { |
|
30 | - addUser(input: {username: "user1"}) { |
|
31 | - user { |
|
32 | - username |
|
33 | - } |
|
34 | - } |
|
35 | - } |
|
36 | - EOF; |
|
37 | - |
|
38 | - $expectedData = [ |
|
39 | - 'addUser' => [ |
|
40 | - 'user' => ['username' => 'user1'], |
|
41 | - ], |
|
42 | - ]; |
|
43 | - |
|
44 | - $this->assertGraphQL($query, $expectedData, null, [], 'public'); |
|
45 | - } |
|
46 | - |
|
47 | - public function testInternalSchema(): void |
|
48 | - { |
|
49 | - $result = $this->executeGraphQLRequest('{bar foo}', [], 'internal'); |
|
50 | - $this->assertSame('bar', $result['data']['bar']); |
|
51 | - $this->assertSame('foo', $result['data']['foo']); |
|
52 | - $this->assertSchemaQueryTypeName('InternalQuery'); |
|
53 | - |
|
54 | - $result = $this->executeGraphQLRequest('{users{edges{node{username email}}}}', [], 'internal'); |
|
55 | - $this->assertSame([['node' => ['username' => 'user1', 'email' => 'topsecret']]], $result['data']['users']['edges']); |
|
56 | - |
|
57 | - $query = <<<'EOF' |
|
58 | - mutation M { |
|
59 | - addUser(input: {username: "user1"}) { |
|
60 | - user { |
|
61 | - username |
|
62 | ||
63 | - } |
|
64 | - } |
|
65 | - } |
|
66 | - EOF; |
|
67 | - |
|
68 | - $expectedData = [ |
|
69 | - 'addUser' => [ |
|
70 | - 'user' => ['username' => 'user1', 'email' => 'email1'], |
|
71 | - ], |
|
72 | - ]; |
|
73 | - |
|
74 | - $this->assertGraphQL($query, $expectedData, null, [], 'internal'); |
|
75 | - } |
|
76 | - |
|
77 | - public function testUnknownTypeShouldThrowAnUnresolvableException(): void |
|
78 | - { |
|
79 | - // @phpstan-ignore-next-line |
|
80 | - $schema = $this->getContainer()->get('overblog_graphql.request_executor')->getSchema('public'); |
|
81 | - $this->expectException(UnresolvableException::class); |
|
82 | - $this->expectExceptionMessage('Could not find type with alias "unknown". Did you forget to define it?'); |
|
83 | - $schema->getType('unknown'); |
|
84 | - } |
|
85 | - |
|
86 | - private function assertSchemaQueryTypeName(string $typeName): void |
|
87 | - { |
|
88 | - // @phpstan-ignore-next-line |
|
89 | - $query = $this->getContainer()->get('overblog_graphql.type_resolver')->resolve($typeName); |
|
90 | - $this->assertSame('Query', $query->name); |
|
91 | - } |
|
92 | -} |
@@ -26,67 +26,3 @@ |
||
26 | 26 | $this->assertSame([['node' => ['username' => 'user1']]], $result['data']['users']['edges']); |
27 | 27 | |
28 | 28 | $query = <<<'EOF' |
29 | - mutation M { |
|
30 | - addUser(input: {username: "user1"}) { |
|
31 | - user { |
|
32 | - username |
|
33 | - } |
|
34 | - } |
|
35 | - } |
|
36 | - EOF; |
|
37 | - |
|
38 | - $expectedData = [ |
|
39 | - 'addUser' => [ |
|
40 | - 'user' => ['username' => 'user1'], |
|
41 | - ], |
|
42 | - ]; |
|
43 | - |
|
44 | - $this->assertGraphQL($query, $expectedData, null, [], 'public'); |
|
45 | - } |
|
46 | - |
|
47 | - public function testInternalSchema(): void |
|
48 | - { |
|
49 | - $result = $this->executeGraphQLRequest('{bar foo}', [], 'internal'); |
|
50 | - $this->assertSame('bar', $result['data']['bar']); |
|
51 | - $this->assertSame('foo', $result['data']['foo']); |
|
52 | - $this->assertSchemaQueryTypeName('InternalQuery'); |
|
53 | - |
|
54 | - $result = $this->executeGraphQLRequest('{users{edges{node{username email}}}}', [], 'internal'); |
|
55 | - $this->assertSame([['node' => ['username' => 'user1', 'email' => 'topsecret']]], $result['data']['users']['edges']); |
|
56 | - |
|
57 | - $query = <<<'EOF' |
|
58 | - mutation M { |
|
59 | - addUser(input: {username: "user1"}) { |
|
60 | - user { |
|
61 | - username |
|
62 | ||
63 | - } |
|
64 | - } |
|
65 | - } |
|
66 | - EOF; |
|
67 | - |
|
68 | - $expectedData = [ |
|
69 | - 'addUser' => [ |
|
70 | - 'user' => ['username' => 'user1', 'email' => 'email1'], |
|
71 | - ], |
|
72 | - ]; |
|
73 | - |
|
74 | - $this->assertGraphQL($query, $expectedData, null, [], 'internal'); |
|
75 | - } |
|
76 | - |
|
77 | - public function testUnknownTypeShouldThrowAnUnresolvableException(): void |
|
78 | - { |
|
79 | - // @phpstan-ignore-next-line |
|
80 | - $schema = $this->getContainer()->get('overblog_graphql.request_executor')->getSchema('public'); |
|
81 | - $this->expectException(UnresolvableException::class); |
|
82 | - $this->expectExceptionMessage('Could not find type with alias "unknown". Did you forget to define it?'); |
|
83 | - $schema->getType('unknown'); |
|
84 | - } |
|
85 | - |
|
86 | - private function assertSchemaQueryTypeName(string $typeName): void |
|
87 | - { |
|
88 | - // @phpstan-ignore-next-line |
|
89 | - $query = $this->getContainer()->get('overblog_graphql.type_resolver')->resolve($typeName); |
|
90 | - $this->assertSame('Query', $query->name); |
|
91 | - } |
|
92 | -} |
@@ -26,67 +26,3 @@ |
||
26 | 26 | $this->assertSame([['node' => ['username' => 'user1']]], $result['data']['users']['edges']); |
27 | 27 | |
28 | 28 | $query = <<<'EOF' |
29 | - mutation M { |
|
30 | - addUser(input: {username: "user1"}) { |
|
31 | - user { |
|
32 | - username |
|
33 | - } |
|
34 | - } |
|
35 | - } |
|
36 | - EOF; |
|
37 | - |
|
38 | - $expectedData = [ |
|
39 | - 'addUser' => [ |
|
40 | - 'user' => ['username' => 'user1'], |
|
41 | - ], |
|
42 | - ]; |
|
43 | - |
|
44 | - $this->assertGraphQL($query, $expectedData, null, [], 'public'); |
|
45 | - } |
|
46 | - |
|
47 | - public function testInternalSchema(): void |
|
48 | - { |
|
49 | - $result = $this->executeGraphQLRequest('{bar foo}', [], 'internal'); |
|
50 | - $this->assertSame('bar', $result['data']['bar']); |
|
51 | - $this->assertSame('foo', $result['data']['foo']); |
|
52 | - $this->assertSchemaQueryTypeName('InternalQuery'); |
|
53 | - |
|
54 | - $result = $this->executeGraphQLRequest('{users{edges{node{username email}}}}', [], 'internal'); |
|
55 | - $this->assertSame([['node' => ['username' => 'user1', 'email' => 'topsecret']]], $result['data']['users']['edges']); |
|
56 | - |
|
57 | - $query = <<<'EOF' |
|
58 | - mutation M { |
|
59 | - addUser(input: {username: "user1"}) { |
|
60 | - user { |
|
61 | - username |
|
62 | ||
63 | - } |
|
64 | - } |
|
65 | - } |
|
66 | - EOF; |
|
67 | - |
|
68 | - $expectedData = [ |
|
69 | - 'addUser' => [ |
|
70 | - 'user' => ['username' => 'user1', 'email' => 'email1'], |
|
71 | - ], |
|
72 | - ]; |
|
73 | - |
|
74 | - $this->assertGraphQL($query, $expectedData, null, [], 'internal'); |
|
75 | - } |
|
76 | - |
|
77 | - public function testUnknownTypeShouldThrowAnUnresolvableException(): void |
|
78 | - { |
|
79 | - // @phpstan-ignore-next-line |
|
80 | - $schema = $this->getContainer()->get('overblog_graphql.request_executor')->getSchema('public'); |
|
81 | - $this->expectException(UnresolvableException::class); |
|
82 | - $this->expectExceptionMessage('Could not find type with alias "unknown". Did you forget to define it?'); |
|
83 | - $schema->getType('unknown'); |
|
84 | - } |
|
85 | - |
|
86 | - private function assertSchemaQueryTypeName(string $typeName): void |
|
87 | - { |
|
88 | - // @phpstan-ignore-next-line |
|
89 | - $query = $this->getContainer()->get('overblog_graphql.type_resolver')->resolve($typeName); |
|
90 | - $this->assertSame('Query', $query->name); |
|
91 | - } |
|
92 | -} |
@@ -26,67 +26,3 @@ |
||
26 | 26 | $this->assertSame([['node' => ['username' => 'user1']]], $result['data']['users']['edges']); |
27 | 27 | |
28 | 28 | $query = <<<'EOF' |
29 | - mutation M { |
|
30 | - addUser(input: {username: "user1"}) { |
|
31 | - user { |
|
32 | - username |
|
33 | - } |
|
34 | - } |
|
35 | - } |
|
36 | - EOF; |
|
37 | - |
|
38 | - $expectedData = [ |
|
39 | - 'addUser' => [ |
|
40 | - 'user' => ['username' => 'user1'], |
|
41 | - ], |
|
42 | - ]; |
|
43 | - |
|
44 | - $this->assertGraphQL($query, $expectedData, null, [], 'public'); |
|
45 | - } |
|
46 | - |
|
47 | - public function testInternalSchema(): void |
|
48 | - { |
|
49 | - $result = $this->executeGraphQLRequest('{bar foo}', [], 'internal'); |
|
50 | - $this->assertSame('bar', $result['data']['bar']); |
|
51 | - $this->assertSame('foo', $result['data']['foo']); |
|
52 | - $this->assertSchemaQueryTypeName('InternalQuery'); |
|
53 | - |
|
54 | - $result = $this->executeGraphQLRequest('{users{edges{node{username email}}}}', [], 'internal'); |
|
55 | - $this->assertSame([['node' => ['username' => 'user1', 'email' => 'topsecret']]], $result['data']['users']['edges']); |
|
56 | - |
|
57 | - $query = <<<'EOF' |
|
58 | - mutation M { |
|
59 | - addUser(input: {username: "user1"}) { |
|
60 | - user { |
|
61 | - username |
|
62 | ||
63 | - } |
|
64 | - } |
|
65 | - } |
|
66 | - EOF; |
|
67 | - |
|
68 | - $expectedData = [ |
|
69 | - 'addUser' => [ |
|
70 | - 'user' => ['username' => 'user1', 'email' => 'email1'], |
|
71 | - ], |
|
72 | - ]; |
|
73 | - |
|
74 | - $this->assertGraphQL($query, $expectedData, null, [], 'internal'); |
|
75 | - } |
|
76 | - |
|
77 | - public function testUnknownTypeShouldThrowAnUnresolvableException(): void |
|
78 | - { |
|
79 | - // @phpstan-ignore-next-line |
|
80 | - $schema = $this->getContainer()->get('overblog_graphql.request_executor')->getSchema('public'); |
|
81 | - $this->expectException(UnresolvableException::class); |
|
82 | - $this->expectExceptionMessage('Could not find type with alias "unknown". Did you forget to define it?'); |
|
83 | - $schema->getType('unknown'); |
|
84 | - } |
|
85 | - |
|
86 | - private function assertSchemaQueryTypeName(string $typeName): void |
|
87 | - { |
|
88 | - // @phpstan-ignore-next-line |
|
89 | - $query = $this->getContainer()->get('overblog_graphql.type_resolver')->resolve($typeName); |
|
90 | - $this->assertSame('Query', $query->name); |
|
91 | - } |
|
92 | -} |
@@ -26,67 +26,3 @@ |
||
26 | 26 | $this->assertSame([['node' => ['username' => 'user1']]], $result['data']['users']['edges']); |
27 | 27 | |
28 | 28 | $query = <<<'EOF' |
29 | - mutation M { |
|
30 | - addUser(input: {username: "user1"}) { |
|
31 | - user { |
|
32 | - username |
|
33 | - } |
|
34 | - } |
|
35 | - } |
|
36 | - EOF; |
|
37 | - |
|
38 | - $expectedData = [ |
|
39 | - 'addUser' => [ |
|
40 | - 'user' => ['username' => 'user1'], |
|
41 | - ], |
|
42 | - ]; |
|
43 | - |
|
44 | - $this->assertGraphQL($query, $expectedData, null, [], 'public'); |
|
45 | - } |
|
46 | - |
|
47 | - public function testInternalSchema(): void |
|
48 | - { |
|
49 | - $result = $this->executeGraphQLRequest('{bar foo}', [], 'internal'); |
|
50 | - $this->assertSame('bar', $result['data']['bar']); |
|
51 | - $this->assertSame('foo', $result['data']['foo']); |
|
52 | - $this->assertSchemaQueryTypeName('InternalQuery'); |
|
53 | - |
|
54 | - $result = $this->executeGraphQLRequest('{users{edges{node{username email}}}}', [], 'internal'); |
|
55 | - $this->assertSame([['node' => ['username' => 'user1', 'email' => 'topsecret']]], $result['data']['users']['edges']); |
|
56 | - |
|
57 | - $query = <<<'EOF' |
|
58 | - mutation M { |
|
59 | - addUser(input: {username: "user1"}) { |
|
60 | - user { |
|
61 | - username |
|
62 | ||
63 | - } |
|
64 | - } |
|
65 | - } |
|
66 | - EOF; |
|
67 | - |
|
68 | - $expectedData = [ |
|
69 | - 'addUser' => [ |
|
70 | - 'user' => ['username' => 'user1', 'email' => 'email1'], |
|
71 | - ], |
|
72 | - ]; |
|
73 | - |
|
74 | - $this->assertGraphQL($query, $expectedData, null, [], 'internal'); |
|
75 | - } |
|
76 | - |
|
77 | - public function testUnknownTypeShouldThrowAnUnresolvableException(): void |
|
78 | - { |
|
79 | - // @phpstan-ignore-next-line |
|
80 | - $schema = $this->getContainer()->get('overblog_graphql.request_executor')->getSchema('public'); |
|
81 | - $this->expectException(UnresolvableException::class); |
|
82 | - $this->expectExceptionMessage('Could not find type with alias "unknown". Did you forget to define it?'); |
|
83 | - $schema->getType('unknown'); |
|
84 | - } |
|
85 | - |
|
86 | - private function assertSchemaQueryTypeName(string $typeName): void |
|
87 | - { |
|
88 | - // @phpstan-ignore-next-line |
|
89 | - $query = $this->getContainer()->get('overblog_graphql.type_resolver')->resolve($typeName); |
|
90 | - $this->assertSame('Query', $query->name); |
|
91 | - } |
|
92 | -} |
@@ -106,13 +106,13 @@ |
||
106 | 106 | protected function createGraphQLServices(array $services = []): GraphQLServices |
107 | 107 | { |
108 | 108 | $locateableServices = [ |
109 | - TypeResolver::class => fn () => $this->createMock(TypeResolver::class), |
|
110 | - QueryResolver::class => fn () => $this->createMock(QueryResolver::class), |
|
111 | - MutationResolver::class => fn () => $$this->createMock(MutationResolver::class), |
|
109 | + TypeResolver::class => fn() => $this->createMock(TypeResolver::class), |
|
110 | + QueryResolver::class => fn() => $this->createMock(QueryResolver::class), |
|
111 | + MutationResolver::class => fn() => $$this->createMock(MutationResolver::class), |
|
112 | 112 | ]; |
113 | 113 | |
114 | 114 | foreach ($services as $id => $service) { |
115 | - $locateableServices[$id] = fn () => $service; |
|
115 | + $locateableServices[$id] = fn() => $service; |
|
116 | 116 | } |
117 | 117 | |
118 | 118 | return new GraphQLServices($locateableServices); |
@@ -71,7 +71,7 @@ |
||
71 | 71 | $alias = $container->getAlias($id); |
72 | 72 | $id = (string) $alias; |
73 | 73 | $definition = $container->getDefinition($id); |
74 | - } catch (ServiceNotFoundException|InvalidArgumentException $e) { |
|
74 | + } catch (ServiceNotFoundException | InvalidArgumentException $e) { |
|
75 | 75 | if ($throw) { |
76 | 76 | throw $e; |
77 | 77 | } |