lubsangarmaev98 / test-client-tz
评论客户端
dev-main
2024-05-26 16:04 UTC
Requires
- php: ^8.1
- halaxa/json-machine: ^1.1
- psr/log: ^3.0
- symfony/http-client: ^6.0
- webmozart/assert: ^1.10
Requires (Dev)
- phpunit/phpunit: ^9.5
This package is auto-updated.
Last update: 2024-09-26 16:37:11 UTC
README
安装: composer require lubsangarmaev98/test-client-tz
https://packagist.org.cn/packages/lubsangarmaev98/test-client-tz
需要实现一个针对抽象(虚构)的 "example.com" 评论服务的客户端。项目应代表一个或多个类,它们将向服务器发送 http 请求。输出应是一个可以连接到任何其他项目的库。该服务有 3 个方法:
GET http://example.com/comments - 返回评论列表 POST http://example.com/comment - 添加评论。PUT http://example.com/comment/{id} - 根据评论 ID 更新请求中的字段
comment 对象包含以下字段:id - 类型 int。添加时无需指定。name - 类型 string。text - 类型 string。
编写 phpunit 测试,用于检查客户端的可用性。不需要编写 example.com 服务器的代码!只需编写用于与之交互的库。