{"id":15008338,"url":"https://github.com/amphp/phpunit-util","last_synced_at":"2025-03-23T02:07:02.387Z","repository":{"id":44735660,"uuid":"84652298","full_name":"amphp/phpunit-util","owner":"amphp","description":"Helper package to ease testing with PHPUnit.","archived":false,"fork":false,"pushed_at":"2024-09-19T05:54:22.000Z","size":139,"stargazers_count":22,"open_issues_count":3,"forks_count":8,"subscribers_count":7,"default_branch":"3.x","last_synced_at":"2025-03-15T03:06:02.757Z","etag":null,"topics":["amphp","async","php","phpunit","phpunit-util","revolt","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/amphp.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","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":"2017-03-11T13:35:20.000Z","updated_at":"2025-03-05T20:16:56.000Z","dependencies_parsed_at":"2024-06-18T15:27:16.916Z","dependency_job_id":"8ad9c5c4-1465-4e45-b129-64759a0ef579","html_url":"https://github.com/amphp/phpunit-util","commit_stats":{"total_commits":93,"total_committers":5,"mean_commits":18.6,"dds":0.4301075268817204,"last_synced_commit":"d83f86fdb87b5cd4ff05dcf7f9a2500eb96e36c3"},"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amphp%2Fphpunit-util","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amphp%2Fphpunit-util/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amphp%2Fphpunit-util/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amphp%2Fphpunit-util/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/amphp","download_url":"https://codeload.github.com/amphp/phpunit-util/tar.gz/refs/heads/3.x","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244902487,"owners_count":20529108,"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":["amphp","async","php","phpunit","phpunit-util","revolt","testing"],"created_at":"2024-09-24T19:17:41.548Z","updated_at":"2025-03-23T02:07:02.363Z","avatar_url":"https://github.com/amphp.png","language":"PHP","funding_links":[],"categories":["Testing"],"sub_categories":["Tunnel"],"readme":"# amphp/phpunit-util\n\nAMPHP is a collection of event-driven libraries for PHP designed with fibers and concurrency in mind.\n`amphp/phpunit-util` is a small helper package to ease testing with PHPUnit.\n\n![License](https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square)\n\n## Installation\n\nThis package can be installed as a [Composer](https://getcomposer.org/) dependency.\n\n```bash\ncomposer require --dev amphp/phpunit-util\n```\n\nThe package requires PHP 8.1 or later.\n\n## Usage\n\n```php\n\u003c?php\n\nnamespace Foo;\n\nuse Amp\\ByteStream;\nuse Amp\\PHPUnit\\AsyncTestCase;\nuse Amp\\Socket;\n\nclass BarTest extends AsyncTestCase\n{\n    // Each test case is executed as a coroutine and checked to run to completion\n    public function test(): void\n    {\n        $socket = Socket\\connect('tcp://localhost:12345');\n        $socket-\u003ewrite('foobar');\n\n        $this-\u003eassertSame('foobar', ByteStream\\buffer($socket));\n    }\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famphp%2Fphpunit-util","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Famphp%2Fphpunit-util","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famphp%2Fphpunit-util/lists"}