Manually calling "createWithAttributes" does not work because Event is not called #320
Unanswered
renepardon
asked this question in
Q&A
Replies: 1 comment 2 replies
-
I think your events aren't dispatched because you're calling Maybe the testing aggregates section in the docs can help you point in the right direction. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
This is my method within Upload model:
I try to call it like that within my test and it fails because return value of createWithAttributes is null:
BUT this works:
Is there something I miss? Shouldn't the events be called synchronous and Projector be called immediately which persists the model instance?
static::uuid is just a helper as shown in the documentation. (https://spatie.be/docs/laravel-event-sourcing/v6/using-projectors/writing-your-first-projector)
Beta Was this translation helpful? Give feedback.
All reactions