@@ -49,7 +49,7 @@ public function testNavigationWhenNoExtraElementThenHasNoNextPage(): void
4949 /** @And the navigation lists no target */
5050 self ::assertCount (0 , $ page ->navigation ()->targets ()->toArray ());
5151
52- /** @And the metadata reports no next page in length-ascending key order */
52+ /** @And the metadata reports no next page in grouped key order (counts and sizes, then the boolean flags) */
5353 self ::assertSame (['per_page ' => 2 , 'has_next ' => false ], $ page ->metadata ());
5454 }
5555
@@ -168,7 +168,7 @@ public function testMapWhenTransformationGivenThenProjectsItemsAndPreservesTheCu
168168 /** @And the next pagination still anchors on the source keys */
169169 self ::assertEquals (Pagination::from (cursor: Token::fromKeys (keys: [20 ]), perPage: 2 ), $ mapped ->next ());
170170
171- /** @And the metadata is preserved in length-ascending key order */
171+ /** @And the metadata is preserved in grouped key order (counts and sizes, then the boolean flags) */
172172 self ::assertSame (['per_page ' => 2 , 'has_next ' => true ], $ mapped ->metadata ());
173173 }
174174
@@ -226,7 +226,7 @@ public function testNavigationWhenExtraElementFetchedThenHasNextAndNextCursorAnc
226226 /** @And the next pagination anchors on the last retained element with the page size */
227227 self ::assertEquals (Pagination::from (cursor: Token::fromKeys (keys: [20 ]), perPage: 2 ), $ page ->next ());
228228
229- /** @And the metadata carries the navigation flags in length-ascending key order */
229+ /** @And the metadata carries every entry in grouped key order (counts and sizes, then the boolean flags) */
230230 self ::assertSame (['per_page ' => 2 , 'has_next ' => true ], $ page ->metadata ());
231231 }
232232}
0 commit comments