wp-graphql / wp-graphql-testcase
Codeception module for WPGraphQL API testing
Installs: 68 697
Dependents: 8
Suggesters: 0
Security: 0
Stars: 7
Watchers: 4
Forks: 5
Open Issues: 0
Requires
- php: ^7.1 || ^8.0
- phpunit/phpunit: ^7.5 || ^8.5.0 || ^9.5
Requires (Dev)
- automattic/vipwpcs: ^2.2
- composer/installers: ^1.9
- johnpbloch/wordpress: ^5.4
- simpod/php-coveralls-mirror: ^3.0
- wp-coding-standards/wpcs: ^2.3
- wp-graphql/wp-graphql: ^1.1.8
Suggests
- codeception/module-asserts: Needed for \Tests\WPGraphQL\TestCase\WPGraphQLTestcase to work.
- codeception/module-rest: Needed for \Tests\WPGraphQL\TestCase\WPGraphQLTestcase to work.
- codeception/util-universalframework: Needed for \Tests\WPGraphQL\TestCase\WPGraphQLTestcase to work.
- lucatume/wp-browser: Needed for \Tests\WPGraphQL\TestCase\WPGraphQLTestcase to work.
- wp-phpunit/wp-phpunit: Needed for \Tests\WPGraphQL\TestCase\WPGraphQLUnitTestcase to work.
- dev-develop
- v2.3.0
- v2.2.0
- v2.1.3
- v2.1.2
- v2.1.1
- v2.1.0
- v2.0.0
- v1.1.3
- v1.1.2
- v1.1.1
- v1.1.0
- v1.0.1
- v1.0.0
- dev-master
- dev-fix/phpunit-9.x-compat-fix
- dev-hotfix/typo-in-WPGraphQLTestCommon.php
- dev-bug/fix-static-method-in-wpgraphql-test-case
- dev-feature/php-8-support
- dev-feature/attempt-to-support-php8
- dev-jasonbahl-patch-1
- dev-release/v2.0
- dev-bugfix/removal-unneeded-deps
This package is auto-updated.
Last update: 2023-05-26 08:02:01 UTC
README
Is a library of tools for testing WPGraphQL APIs, designed for both WPGraphQL and WPGraphQL extension development. Currently the library only consisted of a Codeception Testcase built on top wp-browser's WPTestCase class.
Installing
- Run
composer require wp-graphql/wp-graphql-testcase
from your project directory in the terminal. - (Optionally: Codeception only) If your didn't already have codeception installed in the project, run
vendor/bin/codecept init wpbrowser
. - To make a test case generate a with
vendor/bin/codecept generate:wpunit wpunit TestName
. Then just change the extending class to\Tests\WPGraphQL\TestCase\WPGraphQLTestCase
🤷♂️
Going forward
There are plans to add more to this library, and contribution are greatly appreciated 🙏.