Skip to content

Commit f3fec18

Browse files
committed
Clean up tests and update tooling
1 parent 664ce3d commit f3fec18

File tree

3 files changed

+10
-11
lines changed

3 files changed

+10
-11
lines changed

src/DateScalar.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public function parseLiteral($valueNode, ?array $variables = null): \DateTimeInt
4444
*/
4545
protected function tryParsingDate(mixed $value, string $exceptionClass): \DateTimeInterface
4646
{
47-
if (\is_string($value)) {
47+
if (is_string($value)) {
4848
if (preg_match(static::regex(), $value, $matches) !== 1) {
4949
$regex = static::regex();
5050
throw new $exceptionClass("Value \"{$value}\" does not match \"{$regex}\". Make sure it's ISO 8601 compliant ");

tests/MixedScalarTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ final class MixedScalarTest extends TestCase
1414
{
1515
private Schema $schema;
1616

17-
public function setUp(): void
17+
protected function setUp(): void
1818
{
1919
parent::setUp();
2020

@@ -138,7 +138,7 @@ public static function literalToPhpMap(): iterable
138138
];
139139
}
140140

141-
protected function executeQueryWithLiteral(string $literal): ExecutionResult
141+
private function executeQueryWithLiteral(string $literal): ExecutionResult
142142
{
143143
$query = /** @lang GraphQL */ "
144144
{
@@ -152,10 +152,10 @@ protected function executeQueryWithLiteral(string $literal): ExecutionResult
152152
);
153153
}
154154

155-
protected function executeQueryWithJsonVariable(string $jsonLiteral): ExecutionResult
155+
private function executeQueryWithJsonVariable(string $jsonLiteral): ExecutionResult
156156
{
157157
$query = /** @lang GraphQL */ '
158-
query Foo($var: Mixed) {
158+
query ($var: Mixed) {
159159
foo(bar: $var)
160160
}
161161
';

tests/NullScalarTest.php

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,9 @@ final class NullScalarTest extends TestCase
1414
{
1515
private Schema $schema;
1616

17-
/** @var mixed will be returned by field mixed */
18-
private $return;
17+
private mixed $return;
1918

20-
public function setUp(): void
19+
protected function setUp(): void
2120
{
2221
parent::setUp();
2322

@@ -74,7 +73,7 @@ public function testForbidsNonNullReturn(): void
7473
self::assertSame(['mixed' => null], $graphqlResult->data);
7574
}
7675

77-
protected function executeQueryWithLiteral(string $literal): ExecutionResult
76+
private function executeQueryWithLiteral(string $literal): ExecutionResult
7877
{
7978
$query = /** @lang GraphQL */ "
8079
{
@@ -88,10 +87,10 @@ protected function executeQueryWithLiteral(string $literal): ExecutionResult
8887
);
8988
}
9089

91-
protected function executeQueryWithJsonVariable(string $jsonLiteral): ExecutionResult
90+
private function executeQueryWithJsonVariable(string $jsonLiteral): ExecutionResult
9291
{
9392
$query = /** @lang GraphQL */ '
94-
query Foo($var: Null) {
93+
query ($var: Null) {
9594
foo(bar: $var)
9695
}
9796
';

0 commit comments

Comments
 (0)