Skip to content

Commit 4fbcb61

Browse files
committed
v.1.0.5: Modified tests to run successfully with gmostafa/php-graphql-client v1.6
1 parent 9805936 commit 4fbcb61

File tree

4 files changed

+6
-32
lines changed

4 files changed

+6
-32
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
"bin": ["bin/generate_schema_objects"],
3636
"require": {
3737
"php": "^7.1",
38-
"gmostafa/php-graphql-client": "^1.5"
38+
"gmostafa/php-graphql-client": "^1.6"
3939
},
4040
"require-dev": {
4141
"phpunit/phpunit": "^7.5|^8.0",

tests/ClientTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ protected function setUp(): void
3737
{
3838
$this->mockHandler = new MockHandler();
3939
$handler = HandlerStack::create($this->mockHandler);
40-
$this->client = new MockClient('', $handler);
40+
$this->client = new Client('', [], ['handler' => $handler]);
4141
}
4242

4343
/**
@@ -55,10 +55,10 @@ public function testConstructClient()
5555
$mockHandler->append(new Response(200));
5656
$mockHandler->append(new Response(200));
5757

58-
$client = new MockClient('', $handler);
58+
$client = new Client('', [], ['handler' => $handler]);
5959
$client->runRawQuery('query_string');
6060

61-
$client = new MockClient('', $handler, ['Authorization' => 'Basic xyz']);
61+
$client = new Client('', ['Authorization' => 'Basic xyz'], ['handler' => $handler]);
6262
$client->runRawQuery('query_string');
6363

6464
/** @var Request $firstRequest */
@@ -197,4 +197,4 @@ public function testInternalServerErrorResponse()
197197
$this->expectException(ServerException::class);
198198
$this->client->runRawQuery('');
199199
}
200-
}
200+
}

tests/MockClient.php

Lines changed: 0 additions & 26 deletions
This file was deleted.

tests/SchemaClassGeneratorTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ protected function setUp(): void
2929
$this->mockHandler = new MockHandler();
3030
$handler = HandlerStack::create($this->mockHandler);
3131
$this->classGenerator = new TransparentSchemaClassGenerator(
32-
new MockClient('', $handler),
32+
new Client('', [], ['handler' => $handler]),
3333
static::getGeneratedFilesDir()
3434
);
3535
}

0 commit comments

Comments
 (0)