Skip to content

Commit 0bc07bf

Browse files
committed
Fixes
1 parent 0bda82a commit 0bc07bf

File tree

2 files changed

+20
-1
lines changed

2 files changed

+20
-1
lines changed

packages/Ecotone/src/Lite/Test/FlowTestSupport.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ public function withEventsFor(string|object|array $identifiers, string $aggregat
190190
$this->messagingEntrypoint->sendWithHeaders(
191191
[],
192192
[
193-
AggregateMessage::OVERRIDE_AGGREGATE_IDENTIFIER => is_object($identifiers) ? (string)$identifiers : $identifiers,
193+
AggregateMessage::AGGREGATE_ID => is_object($identifiers) ? (string)$identifiers : $identifiers,
194194
AggregateMessage::TARGET_VERSION => $aggregateVersion,
195195
AggregateMessage::CALLED_AGGREGATE_CLASS => $aggregateClass,
196196
AggregateMessage::CALLED_AGGREGATE_INSTANCE => new $aggregateClass(),

packages/PdoEventSourcing/tests/InMemory/EventSourcedAggregateTestSupportFrameworkTest.php

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,25 @@ public function test_initial_state_is_not_considered_as_recorded_events()
133133
);
134134
}
135135

136+
public function test_initial_state_is_split_into_two()
137+
{
138+
$ecotoneTestSupport = EcotoneLite::bootstrapFlowTesting([Ticket::class]);
139+
140+
$ticketId = Uuid::uuid4()->toString();
141+
142+
$this->assertEquals(
143+
[],
144+
$ecotoneTestSupport
145+
->withEventsFor($ticketId, Ticket::class, [
146+
new TicketWasRegistered($ticketId, 'Johny', 'alert'),
147+
])
148+
->withEventsFor($ticketId, Ticket::class, [
149+
new AssignedPersonWasChanged($ticketId, 'Elvis'),
150+
], 1)
151+
->getRecordedEvents()
152+
);
153+
}
154+
136155
public function test_providing_initial_state_in_form_of_events_with_event_store()
137156
{
138157
$ecotoneTestSupport = EcotoneLite::bootstrapFlowTestingWithEventStore(

0 commit comments

Comments
 (0)