{"id":23879543,"url":"https://github.com/ohseesoftware/laravel-queue-fake","last_synced_at":"2025-04-09T17:45:05.823Z","repository":{"id":57030543,"uuid":"264704914","full_name":"ohseesoftware/laravel-queue-fake","owner":"ohseesoftware","description":"Real simple function to fake Laravel's queue around a closure.","archived":false,"fork":false,"pushed_at":"2021-03-12T03:27:58.000Z","size":16,"stargazers_count":9,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-23T19:51:20.517Z","etag":null,"topics":["facade","laravel","php","queue","testing"],"latest_commit_sha":null,"homepage":null,"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/ohseesoftware.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-05-17T16:02:46.000Z","updated_at":"2024-05-07T22:51:26.000Z","dependencies_parsed_at":"2022-08-23T17:40:56.245Z","dependency_job_id":null,"html_url":"https://github.com/ohseesoftware/laravel-queue-fake","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":"ohseesoftware/laravel-package-boilerplate","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ohseesoftware%2Flaravel-queue-fake","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ohseesoftware%2Flaravel-queue-fake/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ohseesoftware%2Flaravel-queue-fake/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ohseesoftware%2Flaravel-queue-fake/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ohseesoftware","download_url":"https://codeload.github.com/ohseesoftware/laravel-queue-fake/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247744329,"owners_count":20988784,"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":["facade","laravel","php","queue","testing"],"created_at":"2025-01-03T23:17:56.668Z","updated_at":"2025-04-09T17:45:05.797Z","avatar_url":"https://github.com/ohseesoftware.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Laravel Queue Fake\n\n[![Current Release](https://img.shields.io/github/release/ohseesoftware/laravel-queue-fake.svg?style=flat-square)](https://github.com/ohseesoftware/laravel-queue-fake/releases)\n![Build Status Badge](https://github.com/ohseesoftware/laravel-queue-fake/workflows/Build/badge.svg)\n[![Coverage Status](https://coveralls.io/repos/github/ohseesoftware/laravel-queue-fake/badge.svg?branch=master)](https://coveralls.io/github/ohseesoftware/laravel-queue-fake?branch=master)\n[![Maintainability Score](https://img.shields.io/codeclimate/maintainability/ohseesoftware/laravel-queue-fake.svg?style=flat-square)](https://codeclimate.com/github/ohseesoftware/laravel-queue-fake)\n[![Downloads](https://img.shields.io/packagist/dt/ohseesoftware/laravel-queue-fake.svg?style=flat-square)](https://packagist.org/packages/ohseesoftware/laravel-queue-fake)\n[![MIT License](https://img.shields.io/github/license/ohseesoftware/laravel-queue-fake.svg?style=flat-square)](https://github.com/ohseesoftware/laravel-queue-fake/blob/master/LICENSE)\n\n# Overview\n\nThere may be times in your Laravel tests where you want to fake the Queue just for a couple lines, and then revert to the real queue after. This package makes that super simple to do:\n\n```php\n// Given\n\n// Queue is real there\n\n// When\nQueueFake::wrap(function () use (\u0026$value) {\n    // Queue is faked inside this function\n});\n\n// Queue is back to normal here\n```\n\n# Installation\n\n`composer require ohseesoftware/laravel-queue-fake`\n\n# Usage\n\nImagine you need to fake the queue to call your factories to setup your models, but also want to test a job:\n\n```php\n// Given\n$user = null;\nQueueFake::wrap(function () use (\u0026$user) {\n    // Queue is faked inside this function\n    $user = factory(User::class)-\u003ecreate();\n});\n\n// When\n// Queue is back to normal so we can dispatch, etc\nSomeJob::dispatch($user);\n\n// Then\n$this-\u003eassertDatabaseHas('some-table', [\n    'id' =\u003e 1\n]);\n```\n\n## Changelog\n\nPlease see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.\n\n## Contributing\n\nPlease see [CONTRIBUTING](CONTRIBUTING.md) for details.\n\n### Security\n\nIf you discover any security related issues, please email security@ohseesoftware.com instead of using the issue tracker.\n\n## Credits\n\n-   [Owen Conti](https://github.com/ohseesoftware)\n-   [All Contributors](../../contributors)\n\n## License\n\nThe MIT License (MIT). Please see [License File](LICENSE.md) for more information.\n\n## Laravel Package Boilerplate\n\nThis package was generated using the [Laravel Package Boilerplate](https://laravelpackageboilerplate.com).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fohseesoftware%2Flaravel-queue-fake","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fohseesoftware%2Flaravel-queue-fake","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fohseesoftware%2Flaravel-queue-fake/lists"}