{"id":28495234,"url":"https://github.com/net-tools/phpunit-dump","last_synced_at":"2025-07-01T18:31:01.883Z","repository":{"id":57025286,"uuid":"237257197","full_name":"net-tools/phpunit-dump","owner":"net-tools","description":"Dump data generated during a PHPUnit testsuite to a file, mail, etc.","archived":false,"fork":false,"pushed_at":"2023-04-18T19:01:22.000Z","size":32,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-08T11:08:30.226Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/net-tools.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}},"created_at":"2020-01-30T16:41:19.000Z","updated_at":"2022-03-02T19:25:04.000Z","dependencies_parsed_at":"2022-08-23T14:20:13.227Z","dependency_job_id":null,"html_url":"https://github.com/net-tools/phpunit-dump","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/net-tools/phpunit-dump","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/net-tools%2Fphpunit-dump","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/net-tools%2Fphpunit-dump/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/net-tools%2Fphpunit-dump/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/net-tools%2Fphpunit-dump/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/net-tools","download_url":"https://codeload.github.com/net-tools/phpunit-dump/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/net-tools%2Fphpunit-dump/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263017082,"owners_count":23400418,"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":[],"created_at":"2025-06-08T11:08:29.145Z","updated_at":"2025-07-01T18:31:01.875Z","avatar_url":"https://github.com/net-tools.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# net-tools/phpunit-dump\n\n## Composer library to dump data from a PHPUnit testsuite\n\nSometimes we have to check some data produced by a unit test, but this can't be done with PHPUnit assertions.\n\nThis library makes it possible do dump this data to a file or to have the dump sent to a mail recipient, for further inspection.\n\n\n## Setup instructions\n\nTo install net-tools/phpunit-dump package, just require it through composer : `require net-tools/phpunit-dump:^1.0.0`.\n\n\n## How to use ?\n\nThe extension must be registered in PHPUnit xml config file. For example, to register `DumpToMail` extension class :\n\n```xml\n\u003cextensions\u003e\n\t\u003cbootstrap class=\"Nettools\\PHPUnitDump\\DumpToMail\"\u003e\n\t\t\u003cparameter name=\"recipient\" value=\"to@mydomain.tld\"/\u003e\n\t\t\u003cparameter name=\"from\" value=\"phpunit@mydomain.tld\"/\u003e\n\t\t\u003cparameter name=\"body\" value=\"email body text\"/\u003e\n\t\u003c/bootstrap\u003e\n\u003c/extensions\u003e\n```\n\nThe other PHPUnit extension class is `DumpToFile` which write all data to files inside a given path :\n\n```xml\n\u003cbootstrap class=\"Nettools\\PHPUnitDump\\DumpToFile\"\u003e\n\t\u003cparameter name=\"path\" value=\"path/to/file\"/\u003e\n\u003c/bootstrap\u003e\n```\n\n\nThen, during a test, call the static method `DumpExtension::dump($name, $data)` to create a dump value ; `$data` and `$name` are string values (in the case of `DumpToFile`, `$name` will be the filename created for this dump).\n\nAt the end of the whole PHPUnit test, the values will be dumped (to files or as mail attachments).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnet-tools%2Fphpunit-dump","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnet-tools%2Fphpunit-dump","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnet-tools%2Fphpunit-dump/lists"}