{"id":20827706,"url":"https://github.com/peridot-php/leo","last_synced_at":"2025-05-07T21:05:36.806Z","repository":{"id":23251169,"uuid":"26609166","full_name":"peridot-php/leo","owner":"peridot-php","description":"Next level assertion and matcher library for PHP","archived":false,"fork":false,"pushed_at":"2022-05-25T16:00:19.000Z","size":982,"stargazers_count":36,"open_issues_count":6,"forks_count":7,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-05-07T21:05:31.962Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://peridot-php.github.io/leo/","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/peridot-php.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-11-13T21:35:31.000Z","updated_at":"2025-01-21T02:37:45.000Z","dependencies_parsed_at":"2022-08-05T21:15:10.565Z","dependency_job_id":null,"html_url":"https://github.com/peridot-php/leo","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peridot-php%2Fleo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peridot-php%2Fleo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peridot-php%2Fleo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peridot-php%2Fleo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/peridot-php","download_url":"https://codeload.github.com/peridot-php/leo/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252954427,"owners_count":21830903,"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":"2024-11-17T23:12:49.269Z","updated_at":"2025-05-07T21:05:36.785Z","avatar_url":"https://github.com/peridot-php.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Leo logo][logo-image]\n\n[logo-image]: https://raw.github.com/peridot-php/leo/master/leo.png \"Leo logo\"\n\n# Leo\n\nNext level assertion library for PHP\n\n[![Current version image][version-image]][current version]\n[![Current build status image][build-image]][current build status]\n[![Current Scrutinizer code quality image][scrutinizer-image]][current scrutinizer code quality]\n[![Current coverage status image][coverage-image]][current coverage status]\n\n[build-image]: https://img.shields.io/travis/peridot-php/leo/master.svg?style=flat-square \"Current build status for the master branch\"\n[coverage-image]: https://img.shields.io/codecov/c/github/peridot-php/leo/master.svg?style=flat-square \"Current test coverage for the master branch\"\n[current build status]: https://travis-ci.org/peridot-php/leo\n[current coverage status]: https://codecov.io/github/peridot-php/leo\n[current scrutinizer code quality]: https://scrutinizer-ci.com/g/peridot-php/leo/?branch=master\n[current version]: https://packagist.org/packages/peridot-php/leo\n[scrutinizer-image]: https://img.shields.io/scrutinizer/g/peridot-php/leo/master.svg?style=flat-square \"Current Scrutinizer code quality for the master branch\"\n[version-image]: https://img.shields.io/packagist/v/peridot-php/leo.svg?style=flat-square \"This project uses semantic versioning\"\n\nVisit the main site and documentation at [peridot-php.github.io/leo/](http://peridot-php.github.io/leo/).\n\n## Expect Interface\n\nLeo supports a chainable interface for writing assertions via the `expect`\nfunction:\n\n```php\nexpect($obj)-\u003eto-\u003ehave-\u003eproperty('name');\nexpect($value)-\u003eto-\u003ebe-\u003eok\nexpect($fn)-\u003eto-\u003ethrow('InvalidArgumentException', 'Expected message');\nexpect($array)-\u003eto-\u003ebe-\u003ean('array');\nexpect($result)-\u003eto-\u003enot-\u003ebe-\u003eempty;\n```\n\n## Assert Interface\n\nLeo supports a more object oriented, non-chainable interface via `Assert`:\n\n```php\nuse Peridot\\Leo\\Interfaces\\Assert;\n\n$assert = new Assert();\n$assert-\u003eok(true);\n$assert-\u003edoesNotThrow($fn, 'Exception');\n$assert-\u003eisResource(tmpfile());\n$assert-\u003enotEqual($actual, $expected);\n```\n\n## Detailed error messages\n\nLeo matchers generate detailed error messages for failed assertions:\n\n![Leo messages][error-message-image]\n\n[error-message-image]: https://raw.github.com/peridot-php/leo/master/message.png \"Leo messages\"\n\n## Plugins\n\nLeo can be easily customized. For an example see [LeoHttpFoundation]. Read more\non the [plugin guide].\n\n[leohttpfoundation]: https://github.com/peridot-php/leo-http-foundation\n[plugin guide]: http://peridot-php.github.io/leo/plugins.html\n\n## Running Tests\n\n    make test\n\n## Generating Docs\n\nDocumentation is generated via [ApiGen]. Simply run:\n\n    make docs\n\n[apigen]: http://apigen.org/\n\n## Thanks\n\nLeo was inspired by several great projects:\n\n- [Chai] for JS\n- [Jasmine] for JS\n- [Espérance] for PHP\n- [Pho] for PHP\n\nAnd of course our work on [Peridot] gave incentive to make a useful complement.\n\n[chai]: http://chaijs.com/\n[espérance]: https://github.com/esperance/esperance\n[jasmine]: http://jasmine.github.io/\n[peridot]: http://peridot-php.github.io/\n[pho]: https://github.com/danielstjules/pho\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fperidot-php%2Fleo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fperidot-php%2Fleo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fperidot-php%2Fleo/lists"}