{"id":28954407,"url":"https://github.com/paranoiq/envtesting","last_synced_at":"2025-10-15T19:29:38.476Z","repository":{"id":4268768,"uuid":"5396420","full_name":"paranoiq/envtesting","owner":"paranoiq","description":"Fast simple and easy to use environment testing written in PHP. Can check library, services and services response. Produce console, HTML or CSV output.","archived":false,"fork":false,"pushed_at":"2012-07-20T14:06:57.000Z","size":401,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-13T21:58:25.841Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"www.wikidi.com","language":"PHP","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"wikidi/envtesting","license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/paranoiq.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.TXT","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-08-13T08:11:38.000Z","updated_at":"2013-01-11T17:57:25.000Z","dependencies_parsed_at":null,"dependency_job_id":"d4fa4203-6048-49b2-ae31-f0b91feb12a1","html_url":"https://github.com/paranoiq/envtesting","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/paranoiq/envtesting","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paranoiq%2Fenvtesting","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paranoiq%2Fenvtesting/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paranoiq%2Fenvtesting/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paranoiq%2Fenvtesting/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/paranoiq","download_url":"https://codeload.github.com/paranoiq/envtesting/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paranoiq%2Fenvtesting/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271061282,"owners_count":24692496,"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","status":"online","status_checked_at":"2025-08-18T02:00:08.743Z","response_time":89,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-23T19:10:22.748Z","updated_at":"2025-10-15T19:29:33.443Z","avatar_url":"https://github.com/paranoiq.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# envtesting\n\nFast simple and easy to use environment testing written in PHP. Can check library, services and services response.\nProduce console, HTML or CSV output.\n\n## How to use\n\nEnvtesting provide **multiple way** how to test something. You can test:\n\n- using regular PHP file\n- using [anonymous function](http://php.net/manual/en/functions.anonymous.php)\n- using static or regular \"callback\"(http://php.net/manual/en/language.types.callable.php)\n- using object with [__invoke function](http://www.php.net/manual/en/language.oop5.magic.php#object.invoke)\n\n\n```php\n\u003c?php\n$suite = new \\envtesting\\Suite('my great envtest');\n$suite-\u003eaddTest('APC', 'envtests/library/Apc.php', 'apc'); // by file\n```\n\nUsing anonymous function:\n\n```php\n\u003c?php\nrequire_once __DIR__ . '/Envtesting.php';\n$suite = new \\envtesting\\Suite('my great envtest');\n$suite-\u003eaddTest('SOMETHING', function() {\n\tif (true === false) throw new \\envtesting\\Error('True === false');\n\t}, 'boolean');\n```\n\nUsin regular callback:\n\n```php\n\u003c?php\nrequire_once __DIR__ . '/Envtesting.php';\n$suite = new \\envtesting\\Suite('my great envtest');\n$suite-\u003eaddTest('callback', array($test, 'perform_test'), 'callback');\n```\nUsing static callback string:\n\n```php\n\u003c?php\nrequire_once __DIR__ . '/Envtesting.php';\n$suite = new \\envtesting\\Suite('my great envtest');\n$suite-\u003eaddTest('callback', '\\we\\can\\call\\Something::static', 'call');\n```\n\nTest using object with __invoke:\n\n```php\n\u003c?php\nrequire_once __DIR__ . '/Envtesting.php';\n$suite = new \\envtesting\\Suite('my great envtest');\n$suite-\u003eaddTest('memcache', new \\envtests\\services\\memcache\\Connection('127.0.0.1', 11211), 'service');\n```\n\nTests can be grouped into group:\n\n```php\n\u003c?php\nrequire_once __DIR__ . '/Envtesting.php';\n$suite = new \\envtesting\\Suite('my great envtest');\n$suite-\u003egroup-\u003eaddTest('memcache', new \\envtests\\services\\memcache\\Connection('127.0.0.1', 11211), 'service');\n$suite-\u003egroup2-\u003eaddTest('memcache', new \\envtests\\services\\memcache\\Connection('127.0.0.1', 11211), 'service');\n```\n\nYou can shuffle groups of shuffle tests inside groups:\n\n```php\n\u003c?php\nrequire_once __DIR__ . '/Envtesting.php';\n$suite = new \\envtesting\\Suite('my great envtest');\n$suite-\u003egroup-\u003eaddTest('memcache', new \\envtests\\services\\memcache\\Connection('127.0.0.1', 11211), 'service');\n$suite-\u003egroup-\u003eaddTest('memcache', new \\envtests\\services\\memcache\\Connection('127.0.0.1', 11211), 'service');\n$suite-\u003egroup2-\u003eaddTest('memcache', new \\envtests\\services\\memcache\\Connection('127.0.0.1', 11211), 'service');\n$suite-\u003eshuffle(); // mix only groups\n$suite-\u003eshuffle(true); // deep shuffle mix groups and tests inside group\n```\nEnvtesting can render CSV, HTML or text output:\n\n```php\n\u003c?php\nrequire_once __DIR__ . '/Envtesting.php';\n$suite = new \\envtesting\\Suite('my great envtest');\necho $suite;            // generate TXT output\n$suite-\u003erender('csv');  // render CSV output\n$suite-\u003erender('html'); // render HTML output\n```\n\n![HTML output example](/wikidi/envtesting/raw/master/doc/images/html-output-example.png \"HTML output\")\n\n\nVisit more examples in: https://github.com/wikidi/envtesting/tree/master/example\n\n## Requirments\n\n- PHP 5.3 +\n\n## API docs\n\nDon't forget update docs !!!\n\n```bash\nphp ~/workspace/apigen/apigen.php --source ./envtesting --source ./envtests --destination ./doc/api --todo --title \"Envtesting\"\n```\n\n\n\n## Meta\n\nAuthor: [wikidi.com](http://wikidi.com) \u0026 [Roman Ožana](https://github.com/OzzyCzech)\n\nFor the license terms see LICENSE.TXT files.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fparanoiq%2Fenvtesting","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fparanoiq%2Fenvtesting","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fparanoiq%2Fenvtesting/lists"}