Skip to content

Commit

Permalink
Improve test indentation
Browse files Browse the repository at this point in the history
  • Loading branch information
spawnia committed Jan 18, 2023
1 parent edfe179 commit d8ce97e
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 28 deletions.
6 changes: 2 additions & 4 deletions tests/Console/PrintFederationSchemaCommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,15 @@

final class PrintFederationSchemaCommandTest extends TestCase
{
protected const SCHEMA_TYPE /** @lang GraphQL */
= <<<'GRAPHQL'
protected const SCHEMA_TYPE = /** @lang GraphQL */ <<<'GRAPHQL'
type Foo @key(fields: "id") {
id: ID! @external
foo: String!
}

GRAPHQL;

protected const SCHEMA_QUERY /** @lang GraphQL */
= <<<'GRAPHQL'
protected const SCHEMA_QUERY = /** @lang GraphQL */ <<<'GRAPHQL'
type Query {
foo: Int!
}
Expand Down
3 changes: 1 addition & 2 deletions tests/Integration/AutomaticPersistedQueriesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,7 @@ public function testCacheDisabled(): void
$config->set('lighthouse.query_cache.enable', false);
$config->set('lighthouse.persisted_queries', true);

$query /** @lang GraphQL */
= '
$query = /** @lang GraphQL */ '
{
foo
}
Expand Down
12 changes: 6 additions & 6 deletions tests/Integration/CacheControl/CacheControlDirectiveTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public function testDefaultAppResponseHeader(): void
'name' => 'foobar',
]);

$this->schema /** @lang GraphQL */ = '
$this->schema = /** @lang GraphQL */ '
type User {
id: ID!
name: String
Expand All @@ -43,7 +43,7 @@ public function testInheritance(): void
'id' => 1,
]);

$this->schema /** @lang GraphQL */ = '
$this->schema = /** @lang GraphQL */ '
type User {
id: ID!
}
Expand All @@ -69,7 +69,7 @@ public function testRootScalar(string $query, string $expectedHeaderString): voi
{
$this->mockResolver(1);

$this->schema /** @lang GraphQL */ = '
$this->schema = /** @lang GraphQL */ '
type Query {
default: ID @mock
withDirective: ID @mock @cacheControl(maxAge: 5)
Expand Down Expand Up @@ -115,7 +115,7 @@ public function testInheritanceWithNonScalar(): void
'self' => null,
]);

$this->schema /** @lang GraphQL */ = '
$this->schema = /** @lang GraphQL */ '
type User {
id: ID!
child: User
Expand Down Expand Up @@ -147,7 +147,7 @@ public function testDirectiveArguments(string $directive, string $expectedHeader
'name' => 'foobar',
]);

$this->schema /** @lang GraphQL */ = "
$this->schema = /** @lang GraphQL */ "
type User {
id: ID!
name: String {$directive}
Expand Down Expand Up @@ -187,7 +187,7 @@ public static function argumentsDataProvider(): array
*/
public function testUseDirectiveNested(string $query, string $expectedHeaderString): void
{
$this->schema /** @lang GraphQL */ = '
$this->schema = /** @lang GraphQL */ '
type User {
tasks: [Task!]! @hasMany @cacheControl(maxAge: 50)
posts: [Post!]! @hasMany
Expand Down
3 changes: 1 addition & 2 deletions tests/Integration/Schema/Directives/HasManyDirectiveTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -299,8 +299,7 @@ public function testQueryPaginatedHasManyWithConditionInDifferentAliases(): void

public function testQueryPaginatedHasManyWithNonUniqueForeignKey(): void
{
$this->schema /** @lang GraphQL */
= '
$this->schema = /** @lang GraphQL */ '
type Post {
roles: [RoleUser!]! @hasMany(relation: "roles", type: PAGINATOR, defaultCount: 10)
}
Expand Down
27 changes: 13 additions & 14 deletions tests/Unit/Execution/Arguments/ArgumentSetFactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,24 +75,23 @@ public function testItsListsAllTheWayDown(): void
}
';

$barValue
// Level 1
= [
// Level 2
// Level 1
$barValue = [
// Level 2
[
// Level 3
[
// Level 3
// Level 4
[
// Level 4
[
1, 2,
],
[
3, null,
],
1, 2,
],
[
3, null,
],
null,
],
];
null,
],
];

$argumentSet = $this->rootQueryArgumentSet([
'bar' => $barValue,
Expand Down

0 comments on commit d8ce97e

Please sign in to comment.