-
Notifications
You must be signed in to change notification settings - Fork 222
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #496 from mcg-web/executor
Refactor executor/ request executor
- Loading branch information
Showing
7 changed files
with
99 additions
and
184 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Overblog\GraphQLBundle\Tests\Executor; | ||
|
||
use GraphQL\Executor\Promise\Adapter\ReactPromiseAdapter; | ||
use GraphQL\Type\Schema; | ||
use Overblog\GraphQLBundle\Executor\Executor; | ||
use PHPUnit\Framework\TestCase; | ||
|
||
class ExecutorTest extends TestCase | ||
{ | ||
/** | ||
* @expectedException \RuntimeException | ||
* @expectedExceptionMessage PromiseAdapter should be an object instantiating "Overblog\GraphQLBundle\Executor\Promise\PromiseAdapterInterface" or "GraphQL\Executor\Promise\PromiseAdapter" with a "wait" method. | ||
*/ | ||
public function testInvalidExecutorAdapterPromise(): void | ||
{ | ||
$schema = $this->getMockBuilder(Schema::class)->disableOriginalConstructor()->getMock(); | ||
$executor = new Executor(); | ||
$executor->setPromiseAdapter(new ReactPromiseAdapter()); | ||
$executor->execute($schema, ''); | ||
} | ||
} |
Oops, something went wrong.