{"id":46446487,"url":"https://github.com/php-testo/testo","last_synced_at":"2026-06-06T08:03:18.658Z","repository":{"id":318908371,"uuid":"1074774516","full_name":"php-testo/testo","owner":"php-testo","description":"The Testing Framework","archived":false,"fork":false,"pushed_at":"2026-04-29T10:39:58.000Z","size":982,"stargazers_count":170,"open_issues_count":19,"forks_count":6,"subscribers_count":4,"default_branch":"1.x","last_synced_at":"2026-04-29T12:25:59.428Z","etag":null,"topics":["hacktoberfest"],"latest_commit_sha":null,"homepage":"https://php-testo.github.io","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/php-testo.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-10-12T13:05:57.000Z","updated_at":"2026-04-29T10:39:44.000Z","dependencies_parsed_at":"2025-10-26T13:22:47.349Z","dependency_job_id":null,"html_url":"https://github.com/php-testo/testo","commit_stats":null,"previous_names":["php-internal/testo","php-testo/testo"],"tags_count":21,"template":false,"template_full_name":null,"purl":"pkg:github/php-testo/testo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/php-testo%2Ftesto","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/php-testo%2Ftesto/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/php-testo%2Ftesto/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/php-testo%2Ftesto/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/php-testo","download_url":"https://codeload.github.com/php-testo/testo/tar.gz/refs/heads/1.x","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/php-testo%2Ftesto/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32547651,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-02T19:18:06.202Z","status":"ssl_error","status_checked_at":"2026-05-02T19:16:21.335Z","response_time":132,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["hacktoberfest"],"created_at":"2026-03-05T23:12:46.976Z","updated_at":"2026-06-06T08:03:18.645Z","avatar_url":"https://github.com/php-testo.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n    \u003ca href=\"#get-started\"\u003e\u003cimg alt=\"TESTO\"\n         src=\"https://github.com/php-testo/.github/blob/1.x/resources/logo-full.svg?raw=true\"\n         style=\"width: 2in; display: block\"\n    /\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003eThe PHP Testing Framework You Control\u003c/p\u003e\n\n\u003cdiv align=\"center\"\u003e\n\n[![Documentation](https://img.shields.io/badge/Documentation-blue?style=for-the-badge\u0026logo=gitbook\u0026logoColor=white)](https://php-testo.github.io)\n[![Support on Boosty](https://img.shields.io/static/v1?style=for-the-badge\u0026label=\u0026message=Sponsorship\u0026logo=Boosty\u0026logoColor=white\u0026color=%23F15F2C)](https://boosty.to/roxblnfk)\n\n\u003c/div\u003e\n\n\u003cbr /\u003e\n\nTesto is an extensible testing framework built on a lightweight core with a middleware system.\nIt gives you full control over your testing environment while keeping the familiar PHP syntax you already know.\n\n\n## Get Started\n\n### Installation\n\n```bash\ncomposer require --dev testo/testo *\n```\n\n[![PHP](https://img.shields.io/packagist/php-v/testo/testo.svg?style=flat-square\u0026logo=php)](https://packagist.org/packages/testo/testo)\n[![Latest Version on Packagist](https://img.shields.io/packagist/v/testo/testo.svg?style=flat-square\u0026logo=packagist)](https://packagist.org/packages/testo/testo)\n[![License](https://img.shields.io/packagist/l/testo/testo.svg?style=flat-square)](LICENSE.md)\n[![Total Destroys](https://img.shields.io/packagist/dt/testo/testo.svg?style=flat-square)](https://packagist.org/packages/testo/testo/stats)\n\n### Configuration\n\nThe fastest way to set up Testo in your project is the built-in `init` command:\n\n```bash\nvendor/bin/testo init\n```\n\nIt will:\n\n- detect your `src/` directory (or prompt for it),\n- create `tests/Unit/` if missing,\n- generate a minimal `testo.php` next to your `composer.json`,\n- register `composer test` and `composer test:\u003csuite\u003e` scripts.\n\nFor a sub-app layout, point it at the project root: `vendor/bin/testo init --path=app`.\n\n#### Tuning `testo.php` manually\n\n`testo.php` is plain PHP returning an `ApplicationConfig` — edit it freely to add suites, plugins, or coverage. A typical setup looks like:\n\n```php\n\u003c?php\n\ndeclare(strict_types=1);\n\nuse Testo\\Application\\Config\\ApplicationConfig;\nuse Testo\\Application\\Config\\Plugin\\SuitePlugins;\nuse Testo\\Application\\Config\\SuiteConfig;\nuse Testo\\Bench\\BenchmarkPlugin;\nuse Testo\\Inline\\InlineTestPlugin;\n\nreturn new ApplicationConfig(\n    src: ['src'],\n    suites: [\n        new SuiteConfig(\n            name: 'Sources',\n            location: ['src'],\n            // Only Benchmarking and Inline Tests for Source files\n            plugins: SuitePlugins::only(\n                new InlineTestPlugin(),\n                new BenchmarkPlugin(),\n            ),\n        ),\n        new SuiteConfig(\n            name: 'Unit',\n            location: ['tests/Unit'],\n        ),\n    ],\n);\n```\n\nIf no `testo.php` is present at all, Testo falls back to running every test under the `tests/` folder.\n\n### Running Tests\n\nTo run your tests, execute:\n\n```bash\ncomposer test\n```\n\n…or call the binary directly if you skipped `init` / didn't register the script:\n\n```bash\nvendor/bin/testo\n```\n\nYou can also run a single suite by name (one script per detected suite is registered by `init`):\n\n```bash\ncomposer test:unit\ncomposer test:integration\n```\n\n### Writing Your First Test\n\nCreate a test class in the configured test directory (e.g., `tests/CalculatorTest.php`):\n\n```php\n\u003c?php\n\ndeclare(strict_types=1);\n\nnamespace Tests;\n\nuse Testo\\Assert;\nuse Testo\\Assert\\ExpectException;\nuse Testo\\Retry;\nuse Testo\\Test;\n\n#[Test]\nfinal class CalculatorTest\n{\n    public function dividesNumbers(): void\n    {\n        $result = 10 / 2;\n\n        Assert::same($result, 5.0);\n        Assert::notSame($result, 5); // Types matter!\n    }\n\n    #[Retry(maxAttempts: 3)]\n    public function flakyApiCall(): void\n    {\n        // Retries up to 3 times if test fails\n        $response = $this-\u003emakeExternalApiCall();\n\n        Assert::same($response-\u003estatus, 200);\n    }\n\n    #[ExpectException(\\RuntimeException::class)]\n    public function throwsException(): void\n    {\n        throw new \\RuntimeException('Expected error');\n    }\n}\n```\n\nWhat to note:\n- Use the `#[Test]` attribute to mark test methods or classes\n- Test classes don't need to extend any base class\n- Use `Assert` class for assertions (`same`, `true`, `false`, `null`, `contains`, `instanceOf`, etc.)\n- Testo provides multiple attributes to extend testing capabilities (retry policies, exception handling, and more)\n\n## IDE Support\n\nTesto comes with the [IDEA plugin `Testo`](https://plugins.jetbrains.com/plugin/28842-testo?noRedirect=true).\n\n[![Version](https://img.shields.io/jetbrains/plugin/v/28842-testo?style=flat-square)](https://plugins.jetbrains.com/plugin/28842-testo/versions)\n[![Rating](https://img.shields.io/jetbrains/plugin/r/rating/28842-testo?style=flat-square)](https://plugins.jetbrains.com/plugin/28842-testo/reviews)\n[![Downloads](https://img.shields.io/jetbrains/plugin/d/28842-testo?style=flat-square)](https://plugins.jetbrains.com/plugin/28842-testo)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphp-testo%2Ftesto","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphp-testo%2Ftesto","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphp-testo%2Ftesto/lists"}