承接 zestic/codeception-graphql 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

zestic/codeception-graphql

最新稳定版本:v0.5.0

Composer 安装命令:

composer require zestic/codeception-graphql

包简介

GraphQL extension for Codeception

README 文档

README

A codeception extension for calling GraphQL endpoints

This requires a running server, you can use Codeception PhpBuiltInServer if needed.

Installation

composer require zestic/codeception-graphql --dev

To configure

In your acceptance.suite.yml file

modules:
    enabled:
        - GraphQL:
            url: 'http://localhost:8080/'

Testing

To use it in a test

class PingCest
{
    public function testPing(AcceptanceTester $I)
    {
        $query = 'query{ping {response}}';
        $I->sendGraphQL($query);
        $expected = [
            'ping' => [
                'response' => 'pong',
            ],
        ];
        $I->assertEquals($expected, $I->grabResponseData());
    }
}

统计信息

  • 总下载量: 1.84k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 2
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 2
  • Watchers: 1
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-10-20