{"id":21336801,"url":"https://github.com/dan-da/tester-php","last_synced_at":"2025-09-19T22:58:51.206Z","repository":{"id":56961652,"uuid":"102597990","full_name":"dan-da/tester-php","owner":"dan-da","description":"A simple one-file php test harness.","archived":false,"fork":false,"pushed_at":"2019-10-13T22:39:15.000Z","size":23,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-30T12:43:38.335Z","etag":null,"topics":["php","php-testing","phptest","test-automation","test-harness","testing"],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dan-da.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":"2017-09-06T10:59:06.000Z","updated_at":"2019-10-13T22:39:06.000Z","dependencies_parsed_at":"2022-08-21T05:40:22.715Z","dependency_job_id":null,"html_url":"https://github.com/dan-da/tester-php","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/dan-da/tester-php","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dan-da%2Ftester-php","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dan-da%2Ftester-php/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dan-da%2Ftester-php/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dan-da%2Ftester-php/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dan-da","download_url":"https://codeload.github.com/dan-da/tester-php/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dan-da%2Ftester-php/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274915851,"owners_count":25373225,"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-09-13T02:00:10.085Z","response_time":70,"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":["php","php-testing","phptest","test-automation","test-harness","testing"],"created_at":"2024-11-21T23:55:19.664Z","updated_at":"2025-09-19T22:58:51.151Z","avatar_url":"https://github.com/dan-da.png","language":"PHP","readme":"# tester-php\n\nA simple one-file php test harness.\n\nThis is a very lightweight test harness that can be easily installed\nwith composer, or you can just copy the tester.php file into your\nown project.\n\n\n# Let's see an example test.\n\nThe test is in file eq.test.php.\n\n```\n\u003c?php\n\nnamespace tester;\n\nclass eq extends test_base {\n\n    public function runtests() {\n        $this-\u003etest1();\n    }\n\n    protected function test1() {\n\n        $this-\u003eeq( 1, \"1.00\", 'one' );\n        $this-\u003eeq( 2, \"2.00\", 'two' );\n    }\n\n}\n```\n\n## And now let's execute it.\n\n```\n$ ../tester.php \nRunning tests in eq...\n[pass] 1 == 1.00  |  one\n[pass] 2 == 2.00  |  two\n\n\n2 tests passed.\n0 tests failed.\n```\n\n\n# Usage\n\n```\n   tester.php [testfilename]\n   \n   By default, all files matching *.test.php in current directory will be run.\n```\n\n\n# Installation and Running.\n\n\n## Library install\n\nNormally you would install tester-php into your own project using a composer\nrequire in your project's composer.json, eg:\n\n```\n    \"require\": {\n        \"dan-da/tester-php\"\n    }\n```\n\nThen run composer install.\n\ntester.php is then available at \u003cyourproject\u003e/vendor/bin/tester.php.\n\n## Standalone install\n\n```\n git clone https://github.com/dan-da/hd-wallet-derive\n cd hd-wallet-derive\n php -r \"readfile('https://getcomposer.org/installer');\" | php\n php composer.phar install\n```\n\n\n### Run tests.\n```\n$ cd tests\n$ ../tester.php\n```\n\n# Todos\n\n* add more example test cases\n* add proper help/usage.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdan-da%2Ftester-php","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdan-da%2Ftester-php","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdan-da%2Ftester-php/lists"}