{"id":22496971,"url":"https://github.com/morebec/orkestra-event-sourcing-testing","last_synced_at":"2025-03-27T21:25:16.438Z","repository":{"id":49499761,"uuid":"419631321","full_name":"Morebec/orkestra-event-sourcing-testing","owner":"Morebec","description":"Utilities to easily test event sourced systems based on Orkestra and Symfony","archived":false,"fork":false,"pushed_at":"2023-03-31T18:46:38.000Z","size":34,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"2.x","last_synced_at":"2025-02-01T23:45:07.920Z","etag":null,"topics":[],"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/Morebec.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-10-21T07:54:22.000Z","updated_at":"2022-01-12T19:08:47.000Z","dependencies_parsed_at":"2024-12-06T20:15:16.143Z","dependency_job_id":"dd7712aa-7384-4eb6-bd33-ca3d66760bdd","html_url":"https://github.com/Morebec/orkestra-event-sourcing-testing","commit_stats":{"total_commits":10,"total_committers":2,"mean_commits":5.0,"dds":0.09999999999999998,"last_synced_commit":"a1a6035fb28a491ef82548ad320d260abeb2b364"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Morebec%2Forkestra-event-sourcing-testing","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Morebec%2Forkestra-event-sourcing-testing/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Morebec%2Forkestra-event-sourcing-testing/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Morebec%2Forkestra-event-sourcing-testing/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Morebec","download_url":"https://codeload.github.com/Morebec/orkestra-event-sourcing-testing/tar.gz/refs/heads/2.x","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245925696,"owners_count":20694946,"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-12-06T20:15:04.880Z","updated_at":"2025-03-27T21:25:16.405Z","avatar_url":"https://github.com/Morebec.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Event Sourcing Testing\nUtilities to easily test event sourced systems based on Orkestra and Symfony using\na fluent API.\n\n## Installation\n```shell\ncomposer require morebec/orkestra-orkestra-exceptions\n```\n\n## Usage:\n```php\nclass RegisterCustomerCommandHandlerTest extends EventSourcedTestCase\n{\n    /**\n     * @return void\n     * @throws Throwable\n     */\n    public function test(): void\n    {\n        $customerId = uniqid('cus_', true);\n        $this\n            -\u003edefineScenario()\n            -\u003egivenCurrentDateIs(new DateTime(\"2020-01-01\"))\n            -\u003ewhenCommand(from(static function() use ($customerId) {\n                $command = new RegistercustomerCommand();\n                $command-\u003ecustomerId = $customerId;\n\n                return $command;\n            }))\n            -\u003emessageBusShouldRespondWithPayload(null)\n            -\u003emessageBusShouldRespondWithStatusCodeSucceeded()\n            -\u003eexpectSingleEventSameAs(from(static function() use ($customerId) {\n                $event = new CustomerRegisteredEvent();\n                $event-\u003ecustomerId = $customerId;\n\n                return $event;\n            }))\n            -\u003erunScenario()\n        ;\n    }\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmorebec%2Forkestra-event-sourcing-testing","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmorebec%2Forkestra-event-sourcing-testing","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmorebec%2Forkestra-event-sourcing-testing/lists"}