{"id":16863812,"url":"https://github.com/nazar-pc/phpt-tests-runner","last_synced_at":"2025-10-26T22:33:40.317Z","repository":{"id":57024244,"uuid":"58527070","full_name":"nazar-pc/phpt-tests-runner","owner":"nazar-pc","description":"Runner for PHPT tests (with few differences comparing to original PHPT format)","archived":false,"fork":false,"pushed_at":"2018-01-30T07:48:25.000Z","size":26,"stargazers_count":8,"open_issues_count":2,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-10-24T03:54:33.465Z","etag":null,"topics":["php","phpt","tests"],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nazar-pc.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-05-11T08:25:03.000Z","updated_at":"2025-04-07T20:09:14.000Z","dependencies_parsed_at":"2022-08-23T13:50:25.778Z","dependency_job_id":null,"html_url":"https://github.com/nazar-pc/phpt-tests-runner","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/nazar-pc/phpt-tests-runner","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nazar-pc%2Fphpt-tests-runner","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nazar-pc%2Fphpt-tests-runner/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nazar-pc%2Fphpt-tests-runner/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nazar-pc%2Fphpt-tests-runner/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nazar-pc","download_url":"https://codeload.github.com/nazar-pc/phpt-tests-runner/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nazar-pc%2Fphpt-tests-runner/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":281185249,"owners_count":26457745,"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-10-26T02:00:06.575Z","response_time":61,"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","phpt","tests"],"created_at":"2024-10-13T14:39:50.049Z","updated_at":"2025-10-26T22:33:40.287Z","avatar_url":"https://github.com/nazar-pc.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"## PHPT tests runner - Runner for PHPT tests (with few differences comparing to original PHPT format)\n\n```\nPHPT Tests runner\n\nUsage:\n  phpt-tests-runner [-h] [-c] [-C] [-b binary] [files] [directories]\n\nArguments:\n  -h Print this help message\n  -b Specify custom PHP binary to be used (current is used by default)\n  -c Force colored output\n  -C Force no colored output\n\nExamples:\n  Execute tests from tests directory:\n    phpt-tests-runner tests\n  Execute tests single test:\n    phpt-tests-runner tests/sample.phpt\n  Execute tests from tests directory, but skip slow tests using environment variable:\n    SKIP_SLOW_TESTS=1 phpt-tests-runner tests\n\nPHPT Format:\n  This runner uses modification of PHPT format used by PHP itself, so that it can run many original PHPT tests without any changes.\n\n  PHPT test if text file with *.phpt extension.\n  Each file contains sections followed by section contents, everything before first section is ignored, you can use it for storing test description.\n\n  Required sections are --FILE-- and one of [--EXPECT--, --EXPECTF--, --EXPECTREGEX--].\n\nPHPT sections supported:\n  --FILE--        The test source code\n  --EXPECT--      The expected output from the test script (will be executed as PHP script, so it might be code as well as plain text)\n  --EXPECTF--     Similar to --EXPECT--, but it uses substitution tags for strings, spaces, digits, which may vary between test runs\n    The following is a list of all tags and what they are used to represent:\n      %s One or more of anything (character or white space) except the end of line character\n      %S Zero or more of anything (character or white space) except the end of line character\n      %a One or more of anything (character or white space) including the end of line character\n      %A Zero or more of anything (character or white space) including the end of line character\n      %w Zero or more white space characters\n      %i A signed integer value, for example +3142, -3142\n      %d An unsigned integer value, for example 123456\n      %x One or more hexadecimal character. That is, characters in the range 0-9, a-f, A-F\n      %f A floating point number, for example: 3.142, -3.142, 3.142E-10, 3.142e+10\n      %c A single character of any sort (.)\n  --EXPECTREGEX-- Similar to --EXPECT--, but is treated as regular expression\n  --SKIPIF--      If output of execution starts with `skip` then test will be skipped\n  --INI--         Specific php.ini setting for the test, one per line\n  --ARGS--        A single line defining the arguments passed to php\n  --CLEAN--       Code that is executed after a test completes\n\nPHPT tests examples:\n  Examples can be found at \u003chttps://qa.php.net/phpt_details.php\u003e (taking into account differences here)\n\nMain differences from original PHPT tests files:\n  1. --TEST-- is not required and not even used (files names are used instead)\n  2. Only sub-set of sections supported and only sub-set of --EXPECTF-- tags\n  3. --EXPECT*-- sections are interpreted as code and its output is used as expected result\n```\n\n## Requirements:\n\n* PHP 7.0+\n\n## How to use?\n\nSimply add dependency on `nazar-pc/phpt-tests-runner` to your project's `composer.json`:\n\n```json\n{\n    \"require-dev\": {\n        \"nazar-pc/phpt-tests-runner\": \"1.*\"\n    }\n}\n```\n\nThen execute tests as following:\n```\nvendor/bin/phpt-tests-runner tests\n```\nOr if you need environment variables to propagate into tests:\n```\nphp -d variables_order=EGPCS vendor/bin/phpt-tests-runner tests\n```\n\nAlternatively you can install it globally using Composer like this:\n```bash\nsudo COMPOSER_BIN_DIR=/usr/local/bin composer global require nazar-pc/phpt-tests-runner\n```\n`COMPOSER_BIN_DIR=/usr/local/bin` will instruct Composer to install binary to `/usr/local/bin` so that you'll be able to call just `phpt-tests-runner` after installation.\nAlternatively you can skip it and add `~/.composer/vendor/bin/` to your PATH.\n\n## Contribution\nFeel free to create issues and send pull requests, they are highly appreciated!\n\n## License\nFree Public License 1.0.0 / Zero Clause BSD License\n\nhttps://opensource.org/licenses/FPL-1.0.0\n\nhttps://tldrlegal.com/license/bsd-0-clause-license\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnazar-pc%2Fphpt-tests-runner","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnazar-pc%2Fphpt-tests-runner","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnazar-pc%2Fphpt-tests-runner/lists"}