Skip to content

Commit 092ea0a

Browse files
committed
Fix
1 parent 1e49c74 commit 092ea0a

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

src/Store/InMemoryStore.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ static function (Message $message) use ($criteria, $eventRegistry): bool {
263263
return false;
264264
}
265265

266-
if ($index > $criterion->toIndex) {
266+
if ($index >= $criterion->toIndex) {
267267
return false;
268268
}
269269

tests/Unit/Store/InMemoryStoreTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ public function testLoadToIndex(): void
196196

197197
$store = new InMemoryStore([$message1, $message2, $message3, $message4]);
198198

199-
$stream = $store->load(new Criteria(new ToIndexCriterion(2)));
199+
$stream = $store->load(new Criteria(new ToIndexCriterion(3)));
200200

201201
$messages = iterator_to_array($stream);
202202

0 commit comments

Comments
 (0)