承接 akondas/exspecto 相关项目开发

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

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

akondas/exspecto

Composer 安装命令:

composer require --dev akondas/exspecto

包简介

Small PHP DSL for synchronizing asynchronous operations (busy-waiting)

README 文档

README

Minimum PHP Version

Small PHP DSL for synchronizing asynchronous operations (busy-waiting).

A simple and useful library recommended especially for testing asynchronous systems. Exspecto allows you to express expectations of an asynchronous system in a concise and easy to read manner. Example:

await()->atMost(1)->until(function() {
    return customerStatusIsUpdated();
});

You can use pollInterval to set how often the condition should be checked (default value is 100 milliseconds):

await()->atMost(3)->pollInterval(200)->until(function() {
    return customerStatusIsUpdated();
});

You can also await for given value in case the returning method (closure) could throw an exception:

$value = await()->atMost(3)->pollInterval(200)->on(fn() => getValue());

exspecto - from latin: wait for, await

Install

composer require akondas/exspecto

Roadmap

  • untilAsserted for example: untilAsserted('UserRepository::size', equaltTo(3))
  • support different poll interval strategy (fixed, fibonacci, iterative)
  • ignoreExceptions do not stop when exceptions occur (ignoreException(string $exceptionClass))
  • atLeast
  • unitlNotNull, untilNull etc.

License

Exspecto is released under the MIT Licence. See the bundled LICENSE file for details.

Author

Arkadiusz Kondas (@ArkadiuszKondas)

统计信息

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

GitHub 信息

  • Stars: 5
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-01-27

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固