{"id":23774557,"url":"https://github.com/wpup/test-suite","last_synced_at":"2025-09-05T18:32:06.727Z","repository":{"id":30363653,"uuid":"33916175","full_name":"wpup/test-suite","owner":"wpup","description":"Run WordPress tests easy","archived":false,"fork":false,"pushed_at":"2019-12-02T14:20:54.000Z","size":45,"stargazers_count":20,"open_issues_count":1,"forks_count":3,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-12-14T22:07:33.339Z","etag":null,"topics":[],"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/wpup.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":"2015-04-14T07:05:08.000Z","updated_at":"2023-03-28T10:19:23.000Z","dependencies_parsed_at":"2022-09-07T21:22:28.623Z","dependency_job_id":null,"html_url":"https://github.com/wpup/test-suite","commit_stats":null,"previous_names":[],"tags_count":23,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wpup%2Ftest-suite","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wpup%2Ftest-suite/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wpup%2Ftest-suite/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wpup%2Ftest-suite/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wpup","download_url":"https://codeload.github.com/wpup/test-suite/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":232052268,"owners_count":18465727,"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-01-01T06:15:46.908Z","updated_at":"2025-01-01T06:15:47.494Z","avatar_url":"https://github.com/wpup.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# WordPress Test Suite\n\n[![Build Status](https://travis-ci.org/wpup/test-suite.svg?branch=master)](https://travis-ci.org/wpup/test-suite)\n[![No Maintenance Intended](http://unmaintained.tech/badge.svg)](http://unmaintained.tech/)\n\nInstead of adding a `boostrap.php` to every plugin you do you can just install this package and point to the `bootstrap.php`.\nFor small plugins this should be enough. If you require something more advanced this isn't the package for your project.\n\n# Install\n\n```\ncomposer require frozzare/wp-test-suite\n```\n\n## Example\n\nExample `.travis.yml`:\n\n```yaml\nlanguage: php\n\nphp:\n  - 5.4\n  - 5.5\n  - 5.6\n\nenv:\n  - WP_VERSION=latest WP_MULTISITE=0\n\ninstall:\n  - travis_retry composer install --no-interaction --prefer-source\n\nbefore_script:\n  - bash vendor/frozzare/wp-test-suite/bin/install-wp-tests.sh wordpress_test root '' 127.0.0.1 $WP_VERSION\n\nscript: vendor/bin/phpunit\n```\n\nExample `phpunit.xml.dist`:\n\n```xml\n\u003cphpunit\n  bootstrap=\"vendor/frozzare/wp-test-suite/bootstrap.php\"\n  backupGlobals=\"false\"\n  colors=\"true\"\n  convertErrorsToExceptions=\"true\"\n  convertNoticesToExceptions=\"true\"\n  convertWarningsToExceptions=\"true\"\n  \u003e\n  \u003cphp\u003e\n    \u003cconst name=\"WTS_PLUGIN_FILE_NAME\" value=\"simple-gtm.php\" /\u003e\n  \u003c/php\u003e\n  \u003ctestsuites\u003e\n    \u003ctestsuite name=\"Simple GTM Test Suite\"\u003e\n      \u003cdirectory suffix=\".php\"\u003e./tests/\u003c/directory\u003e\n    \u003c/testsuite\u003e\n  \u003c/testsuites\u003e\n  \u003clogging\u003e\n    \u003clog type=\"coverage-clover\" target=\"./tmp/clover.xml\" charset=\"UTF-8\" /\u003e\n  \u003c/logging\u003e\n\u003c/phpunit\u003e\n```\n\nExample of using your own `tests/boostrap.php` with WordPress Test Suite:\n\n```php\nrequire __DIR__ . '/../vendor/autoload.php';\n\nWP_Test_Suite::load_plugins( [\n  __DIR__ . '/../simple-gtm.php'\n] );\n\nWP_Test_Suite::run();\n```\n## Documentation\n\n#### Without a bootstrap.php\n\n#### install-wp-tests.sh\n\nThis package include `install-wp-tests.sh` and the path is:\n\n```\nvendor/frozzare/wp-test-suite/bin/install-wp-tests.sh\n```\n\n##### WTS_PLUGIN_FILE_NAME\n\nWith this constant you don't have to create your own `boostrap.php`. Just include\n`WTS_PLUGIN_FILE_NAME` const in your `phpunit.xml.dist` with the plugin file name\nthat should be loaded.\n\n#### With a bootstrap.php\n\n##### WP_Test_Suite::load_plugins\n\nA array of plugin paths or a string of a plugin path to load.\n\n##### WP_Test_Suite::load_files\n\nA array of file paths or a string of a file path to load.\n\n##### WP_Test_Suite::set_test_root\n\nSet a new test root path. It will try to autoload from:\n- `WP_DEVELOP_DIR/tests/phpunit`\n- `/tmp/wordpress-develop/tests/phpunit`\n- `/tmp/wordpress-tests-lib`\n- `/srv/www/wordpress-develop/tests/phpunit`\n- `/srv/www/wordpress-develop/public_html/tests/phpunit`\n\n## License\n\nMIT © [Fredrik Forsmo](https://github.com/frozzare)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwpup%2Ftest-suite","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwpup%2Ftest-suite","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwpup%2Ftest-suite/lists"}