{"id":15493999,"url":"https://github.com/noonat/pecs","last_synced_at":"2025-04-22T20:22:03.447Z","repository":{"id":57028319,"uuid":"401883","full_name":"noonat/pecs","owner":"noonat","description":"A teensy PHP BDD testing framework.","archived":false,"fork":false,"pushed_at":"2013-01-08T17:27:38.000Z","size":804,"stargazers_count":40,"open_issues_count":7,"forks_count":13,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-10-19T11:30:38.004Z","etag":null,"topics":["bdd","php","spec","testing"],"latest_commit_sha":null,"homepage":"","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/noonat.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":"2009-12-06T10:43:45.000Z","updated_at":"2024-09-21T18:14:44.000Z","dependencies_parsed_at":"2022-08-23T16:20:40.176Z","dependency_job_id":null,"html_url":"https://github.com/noonat/pecs","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/noonat%2Fpecs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/noonat%2Fpecs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/noonat%2Fpecs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/noonat%2Fpecs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/noonat","download_url":"https://codeload.github.com/noonat/pecs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250316163,"owners_count":21410484,"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":["bdd","php","spec","testing"],"created_at":"2024-10-02T08:10:23.996Z","updated_at":"2025-04-22T20:22:03.429Z","avatar_url":"https://github.com/noonat.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"magnificent pecs. [![Build Status][travis_image]][travis]\n=================\n\npecs is a tiny behavior-driven development library for PHP 5.3, a la\n[RSpec][rspec] or [JSpec][jspec].\n\nTo use the traditional example, it works like this:\n\n    require \"lib/pecs.php\";\n    require \"bowling.php\";\n\n    describe(\"Bowling\", function() {\n      it(\"should score 0 for a gutter game\", function() {\n        $bowling = new Bowling();\n        for ($i=0; $i \u003c 20; $i++) {\n          $bowling-\u003ehit(0);\n        }\n        expect($bowling-\u003escore)-\u003eto_equal(0);\n      });\n\n      it(\"should get drinks for free just for being here\", function() {\n        $bowling = new Bowling();\n        expect($bowling-\u003escore)-\u003eto_equal(42);\n      });\n    });\n\n    \\pecs\\run();\n\nThe output looks something like this:\n\n    $ php test_bowling.php\n\n    Bowling\n    - should score 0 for a gutter game: pass\n    - should get drinks for free just for being here: fail\n\n    FAILURE:\n    expected 0 to equal 42\n      #0 .../lib/pecs.php(32): pecs\\Expect-\u003eassert('_equal', Array, true)\n      #1 [internal function]: pecs\\Expect-\u003e__call('to_equal', Array)\n      #2 .../test_bowling.php(15): pecs\\Expect-\u003eto_equal(42)\n      #3 .../lib/pecs.php(221): {closure}()\n      #4 .../lib/pecs.php(192): pecs\\Spec-\u003erun()\n      #5 .../lib/pecs.php(195): pecs\\Suite-\u003erun()\n      #6 .../lib/pecs.php(195): pecs\\Suite-\u003erun()\n      #7 .../lib/pecs.php(262): pecs\\Suite-\u003erun()\n      #8 .../lib/pecs.php(350): pecs\\Runner-\u003erun(NULL)\n      #9 .../test_bowling.php(19): pecs\\run()\n      #10 {main}\n\n    Finished in 0.0017 seconds\n\n    Passed: 1 Failed: 1\n\nCredit\n======\n\npecs is greatly inspired by [JSpec][jspec]'s grammar-less syntax, and was\nwritten because I don't want to have to switch gears so much when going\nbetween PHP and JSpec testing.\n\nContributors:\n\n* [noonat](https://github.com/noonat)\n* [phuedx](https://github.com/phuedx)\n* [sorcerershell](https://github.com/sorcerershell)\n\nTodo\n====\n\n* Add `before` and `after` hooks\n* Need to add more matchers\n* Need to improve failure output\n\nLicense\n=======\n\n(The MIT License)\n\nCopyright ©2009 noonat\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of\nthis software and associated documentation files (the ‘Software’), to deal in\nthe Software without restriction, including without limitation the rights to\nuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\nthe Software, and to permit persons to whom the Software is furnished to do so,\nsubject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED ‘AS IS’, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\nFOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\nCOPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\nIN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\nCONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n[rspec]: http://github.com/dchelimsky/rspec\n[jspec]: http://github.com/visionmedia/jspec\n[travis]: http://travis-ci.org/noonat/pecs\n[travis_image]: https://secure.travis-ci.org/noonat/pecs.png?branch=master\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnoonat%2Fpecs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnoonat%2Fpecs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnoonat%2Fpecs/lists"}