lastdragon-ru / graphql-printer-testing
The Awesome Set of Packages for Laravel - The GraphQL Testing Assertions
dev-main
2025-08-08 07:30 UTC
Requires
- php: ^8.3|^8.4
- lastdragon-ru/graphql-printer: dev-main
- lastdragon-ru/lara-asp-testing: dev-main
- phpunit/phpunit: ^11.2.0|^12.0.0
- webonyx/graphql-php: ^15.4.0
Requires (Dev)
- mockery/mockery: ^1.6.6
This package is auto-updated.
Last update: 2025-08-08 10:33:09 UTC
README
Useful assertions for PHPUnit to check printed/exported type/queries with lastdragon-ru/graphql-printer
package
Requirements
Requirement | Constraint | Supported by |
---|---|---|
PHP | ^8.4 |
HEAD |
^8.3 |
HEAD |
|
PHPUnit | ^12.0.0 |
HEAD |
^11.2.0 |
HEAD |
Installation
composer require lastdragon-ru/graphql-printer-testing
Usage
<?php declare(strict_types = 1); namespace LastDragon_ru\GraphQLPrinter\Testing\Docs\Examples; use LastDragon_ru\GraphQLPrinter\Testing\GraphQLAssertions; use PHPUnit\Framework\TestCase; /** * @internal */ abstract class Usage extends TestCase { use GraphQLAssertions; }
Laravel/Lighthouse
It is highly recommended to use lastdragon-ru/lara-asp-graphql-testing
package to use assertions within the Laravel/Lighthouse application.
Assertions
assertGraphQLExportableEquals
Exports and compares two GraphQL schemas/types/nodes/etc.
assertGraphQLPrintableEquals
Prints and compares two GraphQL schemas/types/nodes/etc.
Contributing
This package is the part of Awesome Set of Packages for Laravel. Please use the main repository to report issues, send pull requests, or ask questions.