File tree Expand file tree Collapse file tree 2 files changed +3
-1
lines changed
Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -136,7 +136,7 @@ private function collection(mixed $resultSet): array
136136 $ return [$ collection ][$ first ] = $ this ->paginator ->first ();
137137 $ return [$ collection ][$ last ] = $ this ->paginator ->last ();
138138 $ return [$ collection ][$ pages ] = $ this ->paginator ->total ();
139- $ return [$ collection ][$ total ] = intval ($ this ->paginator ->param ('count ' ));
139+ $ return [$ collection ][$ total ] = intval ($ this ->paginator ->param ('totalCount ' ));
140140 }
141141
142142 if (empty ($ return [$ collection ][$ first ]) && !empty ($ return [$ collection ][$ url ])) {
Original file line number Diff line number Diff line change @@ -85,6 +85,8 @@ public function test_as_json(): void
8585
8686 $ obj = json_decode ($ json );
8787 $ this ->assertIsObject ($ obj );
88+ $ this ->assertEquals (20 , $ obj ->collection ->count );
89+ $ this ->assertEquals (60 , $ obj ->collection ->total );
8890 $ this ->assertEquals ('/ ' , $ obj ->collection ->url );
8991 $ this ->assertCount (1 , (array ) $ obj ->data );
9092 }
You can’t perform that action at this time.
0 commit comments