{"id":15014519,"url":"https://github.com/duncan3dc/uopz-expectations","last_synced_at":"2025-04-12T08:08:57.057Z","repository":{"id":56973232,"uuid":"132475249","full_name":"duncan3dc/uopz-expectations","owner":"duncan3dc","description":"Mock core PHP functions using a Mockery like interface","archived":false,"fork":false,"pushed_at":"2021-08-15T10:49:24.000Z","size":777,"stargazers_count":8,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-12T08:07:30.205Z","etag":null,"topics":["mockery","mocking","php","phpunit","testing","uopz"],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/duncan3dc.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-05-07T14:48:29.000Z","updated_at":"2021-11-09T11:59:51.000Z","dependencies_parsed_at":"2022-08-21T07:10:27.120Z","dependency_job_id":null,"html_url":"https://github.com/duncan3dc/uopz-expectations","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/duncan3dc%2Fuopz-expectations","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/duncan3dc%2Fuopz-expectations/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/duncan3dc%2Fuopz-expectations/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/duncan3dc%2Fuopz-expectations/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/duncan3dc","download_url":"https://codeload.github.com/duncan3dc/uopz-expectations/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248537136,"owners_count":21120709,"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":["mockery","mocking","php","phpunit","testing","uopz"],"created_at":"2024-09-24T19:45:43.668Z","updated_at":"2025-04-12T08:08:56.977Z","avatar_url":"https://github.com/duncan3dc.png","language":"PHP","funding_links":["https://tidelift.com/subscription/pkg/packagist-duncan3dc-uopz-expectations?utm_source=packagist-duncan3dc-uopz-expectations\u0026utm_medium=referral\u0026utm_campaign=readme"],"categories":[],"sub_categories":[],"readme":"# uopz-expectations\nMock core functions and set up expectations similar to Mockery.\n\nFull documentation is available at http://duncan3dc.github.io/uopz-expectations/  \nPHPDoc API documentation is also available at [http://duncan3dc.github.io/uopz-expectations/api/](http://duncan3dc.github.io/uopz-expectations/api/namespaces/duncan3dc.Mock.html)  \n\n[![release](https://poser.pugx.org/duncan3dc/uopz-expectations/version.svg)](https://packagist.org/packages/duncan3dc/uopz-expectations)\n[![build](https://github.com/duncan3dc/uopz-expectations/workflows/.github/workflows/buildcheck.yml/badge.svg?branch=master)](https://github.com/duncan3dc/uopz-expectations/actions?query=branch%3Amaster+workflow%3A.github%2Fworkflows%2Fbuildcheck.yml)\n[![coverage](https://codecov.io/gh/duncan3dc/uopz-expectations/graph/badge.svg)](https://codecov.io/gh/duncan3dc/uopz-expectations)\n\n\n## Introduction\n\nThe [uopz](https://secure.php.net/manual/en/intro.uopz.php) extension offers an easy to way mock core functions.  \nThe [Mockery](https://github.com/mockery/mockery) library offers a succinct API to declare expectation method calls.  \nThis library combines the two to offer core function mocking with a familiar API.  \n\n\n## Installation\n\nThe recommended method of installing this library is via [Composer](//getcomposer.org/).\n\nRun the following command from your project root:\n\n```bash\n$ composer require --dev duncan3dc/uopz-expectations\n```\n\n\n## Getting Started\n\n```php\nuse duncan3dc\\Mock\\CoreFunction;\n\nCoreFunction::mock(\"time\")-\u003etwice()-\u003ewith()-\u003eandReturn(777);\n\ntime(); # 777\n\n/**\n * At this point the expectations will be checked,\n * and an exception will be throw as `time()`\n * should have been called twice.\n */\nCoreFunction::close();\n```\n\n_Read more at http://duncan3dc.github.io/uopz-expectations/_  \n\n\n## Where to get help\nFound a bug? Got a question? Just not sure how something works?  \nPlease [create an issue](//github.com/duncan3dc/uopz-expectations/issues) and I'll do my best to help out.  \nAlternatively you can catch me on [Twitter](https://twitter.com/duncan3dc)\n\n\n## duncan3dc/uopz-expectations for enterprise\n\nAvailable as part of the Tidelift Subscription\n\nThe maintainers of duncan3dc/uopz-expectations and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. [Learn more.](https://tidelift.com/subscription/pkg/packagist-duncan3dc-uopz-expectations?utm_source=packagist-duncan3dc-uopz-expectations\u0026utm_medium=referral\u0026utm_campaign=readme)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fduncan3dc%2Fuopz-expectations","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fduncan3dc%2Fuopz-expectations","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fduncan3dc%2Fuopz-expectations/lists"}