Skip to content

Commit e0c45d7

Browse files
committed
Fix method call params order
1 parent 8ad0047 commit e0c45d7

File tree

2 files changed

+17
-17
lines changed

2 files changed

+17
-17
lines changed

test/DirectivesTest.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ public function testKeyDirective(): void
2323

2424
$expectedLocations = [DirectiveLocation::OBJECT, DirectiveLocation::IFACE];
2525

26-
$this->assertEquals($config['name'], 'key');
27-
$this->assertEqualsCanonicalizing($config['locations'], $expectedLocations);
26+
$this->assertEquals('key', $config['name']);
27+
$this->assertEqualsCanonicalizing($expectedLocations, $config['locations']);
2828
}
2929

3030
public function testExternalDirective(): void
@@ -33,8 +33,8 @@ public function testExternalDirective(): void
3333

3434
$expectedLocations = [DirectiveLocation::FIELD_DEFINITION];
3535

36-
$this->assertEquals($config['name'], 'external');
37-
$this->assertEqualsCanonicalizing($config['locations'], $expectedLocations);
36+
$this->assertEquals('external', $config['name']);
37+
$this->assertEqualsCanonicalizing($expectedLocations, $config['locations']);
3838
}
3939

4040
public function testRequiresDirective(): void
@@ -43,8 +43,8 @@ public function testRequiresDirective(): void
4343

4444
$expectedLocations = [DirectiveLocation::FIELD_DEFINITION];
4545

46-
$this->assertEquals($config['name'], 'requires');
47-
$this->assertEqualsCanonicalizing($config['locations'], $expectedLocations);
46+
$this->assertEquals('requires', $config['name']);
47+
$this->assertEqualsCanonicalizing($expectedLocations, $config['locations']);
4848
}
4949

5050
public function testProvidesDirective(): void
@@ -53,8 +53,8 @@ public function testProvidesDirective(): void
5353

5454
$expectedLocations = [DirectiveLocation::FIELD_DEFINITION];
5555

56-
$this->assertEquals($config['name'], 'provides');
57-
$this->assertEqualsCanonicalizing($config['locations'], $expectedLocations);
56+
$this->assertEquals('provides', $config['name']);
57+
$this->assertEqualsCanonicalizing($expectedLocations, $config['locations']);
5858
}
5959

6060
public function testItAddsDirectivesToSchema(): void

test/EntitiesTest.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ class EntitiesTest extends TestCase
1616

1717
public function testCreatingEntityType(): void
1818
{
19-
$userTypeKeyFields = ['id', 'email'];
19+
$expectedKeyFields = ['id', 'email'];
2020

2121
$userType = new EntityObjectType([
2222
'name' => 'User',
23-
'keyFields' => $userTypeKeyFields,
23+
'keyFields' => $expectedKeyFields,
2424
'fields' => [
2525
'id' => ['type' => Type::int()],
2626
'email' => ['type' => Type::string()],
@@ -29,17 +29,17 @@ public function testCreatingEntityType(): void
2929
],
3030
]);
3131

32-
$this->assertEqualsCanonicalizing($userType->getKeyFields(), $userTypeKeyFields);
32+
$this->assertEqualsCanonicalizing($expectedKeyFields, $userType->getKeyFields());
3333
$this->assertMatchesSnapshot($userType->config);
3434
}
3535

3636
public function testCreatingEntityTypeWithCallable(): void
3737
{
38-
$userTypeKeyFields = ['id', 'email'];
38+
$expectedKeyFields = ['id', 'email'];
3939

4040
$userType = new EntityObjectType([
4141
'name' => 'User',
42-
'keyFields' => $userTypeKeyFields,
42+
'keyFields' => $expectedKeyFields,
4343
'fields' => function () {
4444
return [
4545
'id' => ['type' => Type::int()],
@@ -50,7 +50,7 @@ public function testCreatingEntityTypeWithCallable(): void
5050
},
5151
]);
5252

53-
$this->assertEqualsCanonicalizing($userType->getKeyFields(), $userTypeKeyFields);
53+
$this->assertEqualsCanonicalizing($expectedKeyFields, $userType->getKeyFields());
5454
$this->assertMatchesSnapshot($userType->config);
5555
}
5656

@@ -85,18 +85,18 @@ public function testResolvingEntityReference(): void
8585

8686
public function testCreatingEntityRefType(): void
8787
{
88-
$userTypeKeyFields = ['id', 'email'];
88+
$expectedKeyFields = ['id', 'email'];
8989

9090
$userType = new EntityRefObjectType([
9191
'name' => 'User',
92-
'keyFields' => $userTypeKeyFields,
92+
'keyFields' => $expectedKeyFields,
9393
'fields' => [
9494
'id' => ['type' => Type::int()],
9595
'email' => ['type' => Type::string()],
9696
],
9797
]);
9898

99-
$this->assertEqualsCanonicalizing($userType->getKeyFields(), $userTypeKeyFields);
99+
$this->assertEqualsCanonicalizing($expectedKeyFields, $userType->getKeyFields());
100100
$this->assertMatchesSnapshot($userType->config);
101101
}
102102
}

0 commit comments

Comments
 (0)