@@ -107,7 +107,8 @@ public function testVisibilitySettings()
107
107
$ this ->controller ->getRequest ()->withEnv ('HTTP_ACCEPT ' , 'application/json ' )
108
108
);
109
109
$ this ->controller ->set ('data ' , $ this ->controller ->paginate ($ this ->Articles ));
110
- $ apiPaginationComponent = new ApiPaginationComponent ($ this ->controller ->components (), [
110
+ $ apiPaginationComponent = new ApiPaginationComponent (
111
+ $ this ->controller ->components (), [
111
112
'visible ' => [
112
113
'page ' ,
113
114
'current ' ,
@@ -116,7 +117,8 @@ public function testVisibilitySettings()
116
117
'nextPage ' ,
117
118
'pageCount '
118
119
]
119
- ]);
120
+ ]
121
+ );
120
122
$ event = new Event ('Controller.beforeRender ' , $ this ->controller );
121
123
$ apiPaginationComponent ->beforeRender ($ event );
122
124
@@ -144,13 +146,15 @@ public function testAliasSettings()
144
146
$ this ->controller ->getRequest ()->withEnv ('HTTP_ACCEPT ' , 'application/json ' )
145
147
);
146
148
$ this ->controller ->set ('data ' , $ this ->controller ->paginate ($ this ->Articles ));
147
- $ apiPaginationComponent = new ApiPaginationComponent ($ this ->controller ->components (), [
149
+ $ apiPaginationComponent = new ApiPaginationComponent (
150
+ $ this ->controller ->components (), [
148
151
'aliases ' => [
149
152
'page ' => 'curPage ' ,
150
153
'current ' => 'currentCount ' ,
151
154
'count ' => 'totalCount ' ,
152
155
]
153
- ]);
156
+ ]
157
+ );
154
158
$ event = new Event ('Controller.beforeRender ' , $ this ->controller );
155
159
$ apiPaginationComponent ->beforeRender ($ event );
156
160
@@ -190,9 +194,11 @@ public function testKeySetting()
190
194
$ this ->controller ->getRequest ()->withEnv ('HTTP_ACCEPT ' , 'application/json ' )
191
195
);
192
196
$ this ->controller ->set ('data ' , $ this ->controller ->paginate ($ this ->Articles ));
193
- $ apiPaginationComponent = new ApiPaginationComponent ($ this ->controller ->components (), [
197
+ $ apiPaginationComponent = new ApiPaginationComponent (
198
+ $ this ->controller ->components (), [
194
199
'key ' => 'paging '
195
- ]);
200
+ ]
201
+ );
196
202
$ event = new Event ('Controller.beforeRender ' , $ this ->controller );
197
203
$ apiPaginationComponent ->beforeRender ($ event );
198
204
@@ -232,7 +238,8 @@ public function testAllSettings()
232
238
$ this ->controller ->getRequest ()->withEnv ('HTTP_ACCEPT ' , 'application/json ' )
233
239
);
234
240
$ this ->controller ->set ('data ' , $ this ->controller ->paginate ($ this ->Articles ));
235
- $ apiPaginationComponent = new ApiPaginationComponent ($ this ->controller ->components (), [
241
+ $ apiPaginationComponent = new ApiPaginationComponent (
242
+ $ this ->controller ->components (), [
236
243
'key ' => 'fun ' ,
237
244
'aliases ' => [
238
245
'page ' => 'currentPage ' ,
@@ -246,7 +253,8 @@ public function testAllSettings()
246
253
'prevPage ' ,
247
254
'nextPage '
248
255
]
249
- ]);
256
+ ]
257
+ );
250
258
$ event = new Event ('Controller.beforeRender ' , $ this ->controller );
251
259
$ apiPaginationComponent ->beforeRender ($ event );
252
260
0 commit comments