{"id":16233837,"url":"https://github.com/akondas/exspecto","last_synced_at":"2025-03-19T14:31:47.005Z","repository":{"id":47582104,"uuid":"333229129","full_name":"akondas/exspecto","owner":"akondas","description":"Small PHP DSL for synchronizing asynchronous operations (busy-waiting).","archived":false,"fork":false,"pushed_at":"2024-01-23T08:46:04.000Z","size":30,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-05-01T14:41:09.130Z","etag":null,"topics":["asynchronous-programming","busy-wait","hacktoberfest","php","quality-assurance","testing"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/akondas.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-01-26T22:03:00.000Z","updated_at":"2021-10-13T19:00:50.000Z","dependencies_parsed_at":"2024-10-10T13:14:05.919Z","dependency_job_id":"c253d636-f034-4fa7-8538-9c72c360cab3","html_url":"https://github.com/akondas/exspecto","commit_stats":{"total_commits":5,"total_committers":1,"mean_commits":5.0,"dds":0.0,"last_synced_commit":"80d8b1fa3cecc2b618ae05890e41d6b88cdb113d"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akondas%2Fexspecto","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akondas%2Fexspecto/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akondas%2Fexspecto/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akondas%2Fexspecto/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/akondas","download_url":"https://codeload.github.com/akondas/exspecto/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244444736,"owners_count":20453785,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["asynchronous-programming","busy-wait","hacktoberfest","php","quality-assurance","testing"],"created_at":"2024-10-10T13:14:03.473Z","updated_at":"2025-03-19T14:31:46.998Z","avatar_url":"https://github.com/akondas.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Exspecto\n\n[![Minimum PHP Version](https://img.shields.io/badge/php-%3E%3D%208.2-8892BF.svg)](https://php.net/)\n\nSmall PHP DSL for synchronizing asynchronous operations (busy-waiting).\n\nA simple and useful library recommended especially for testing asynchronous systems.\nExspecto allows you to express expectations of an asynchronous system in a concise and easy to read manner. Example:\n\n```php\nawait()-\u003eatMost(1)-\u003euntil(function() {\n    return customerStatusIsUpdated();\n});\n```\n\nYou can use `pollInterval` to set how often the condition should be checked (default value is 100 milliseconds):\n\n```php\nawait()-\u003eatMost(3)-\u003epollInterval(200)-\u003euntil(function() {\n    return customerStatusIsUpdated();\n});\n```\n\nYou can also await for given value in case the returning method (closure) could throw an exception:\n```php\n$value = await()-\u003eatMost(3)-\u003epollInterval(200)-\u003eon(fn() =\u003e getValue());\n```\n\n---\n\n*exspecto* - from latin: *wait for*, *await*\n\n## Install\n\n```shell\ncomposer require akondas/exspecto\n```\n\n## Roadmap\n\n- [ ] `untilAsserted` for example: `untilAsserted('UserRepository::size', equaltTo(3))`\n- [ ] support different poll interval strategy (fixed, fibonacci, iterative)\n- [ ] `ignoreExceptions` do not stop when exceptions occur (`ignoreException(string $exceptionClass)`)\n- [ ] `atLeast`\n- [ ] `unitlNotNull`, `untilNull` etc.\n\n## License\n\nExspecto is released under the MIT Licence. See the bundled LICENSE file for details.\n\n## Author\n\nArkadiusz Kondas (@ArkadiuszKondas)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fakondas%2Fexspecto","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fakondas%2Fexspecto","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fakondas%2Fexspecto/lists"}