1
|
<?php
|
2
|
|
3
|
/**
|
4
|
* @file
|
5
|
* Definition of ViewsPagerTest.
|
6
|
*/
|
7
|
|
8
|
/**
|
9
|
* Tests the pluggable pager system.
|
10
|
*/
|
11
|
class ViewsPagerTest extends ViewsSqlTest {
|
12
|
|
13
|
/**
|
14
|
*
|
15
|
*/
|
16
|
public static function getInfo() {
|
17
|
return array(
|
18
|
'name' => 'Pager',
|
19
|
'description' => 'Test the pluggable pager system',
|
20
|
'group' => 'Views Plugins',
|
21
|
);
|
22
|
}
|
23
|
|
24
|
/**
|
25
|
* Pagers was sometimes not stored.
|
26
|
*
|
27
|
* @see http://drupal.org/node/652712
|
28
|
*/
|
29
|
public function testStorePagerSettings() {
|
30
|
$admin_user = $this->drupalCreateUser(array('administer views', 'administer site configuration'));
|
31
|
$this->drupalLogin($admin_user);
|
32
|
// Test behaviour described in
|
33
|
// http://drupal.org/node/652712#comment-2354918.
|
34
|
$this->drupalGet('admin/structure/views/view/frontpage/edit');
|
35
|
|
36
|
$edit = array(
|
37
|
'pager_options[items_per_page]' => 20,
|
38
|
);
|
39
|
$this->drupalPost('admin/structure/views/nojs/display/frontpage/default/pager_options', $edit, t('Apply'));
|
40
|
$this->assertText('20 items');
|
41
|
|
42
|
// Change type and check whether the type is new type is stored.
|
43
|
$edit = array();
|
44
|
$edit = array(
|
45
|
'pager[type]' => 'mini',
|
46
|
);
|
47
|
$this->drupalPost('admin/structure/views/nojs/display/frontpage/default/pager', $edit, t('Apply'));
|
48
|
$this->drupalGet('admin/structure/views/view/frontpage/edit');
|
49
|
$this->assertText('Mini', 'Changed pager plugin, should change some text');
|
50
|
|
51
|
// Test behaviour described in http://drupal.org/node/652712#comment-2354400
|
52
|
$view = $this->viewsStorePagerSettings();
|
53
|
// Make it editable in the admin interface.
|
54
|
$view->save();
|
55
|
|
56
|
$this->drupalGet('admin/structure/views/view/test_store_pager_settings/edit');
|
57
|
|
58
|
$edit = array();
|
59
|
$edit = array(
|
60
|
'pager[type]' => 'full',
|
61
|
);
|
62
|
$this->drupalPost('admin/structure/views/nojs/display/test_store_pager_settings/default/pager', $edit, t('Apply'));
|
63
|
$this->drupalGet('admin/structure/views/view/test_store_pager_settings/edit');
|
64
|
$this->assertText('Full');
|
65
|
|
66
|
$edit = array(
|
67
|
'pager_options[items_per_page]' => 20,
|
68
|
);
|
69
|
$this->drupalPost('admin/structure/views/nojs/display/test_store_pager_settings/default/pager_options', $edit, t('Apply'));
|
70
|
$this->assertText('20 items');
|
71
|
|
72
|
// Add new display and test the settings again, by override it.
|
73
|
$edit = array();
|
74
|
// Add a display and override the pager settings.
|
75
|
$this->drupalPost('admin/structure/views/view/test_store_pager_settings/edit', $edit, t('Add Page'));
|
76
|
$edit = array(
|
77
|
'override[dropdown]' => 'page_1',
|
78
|
);
|
79
|
$this->drupalPost('admin/structure/views/nojs/display/test_store_pager_settings/page_1/pager', $edit, t('Apply'));
|
80
|
|
81
|
$edit = array(
|
82
|
'pager[type]' => 'mini',
|
83
|
);
|
84
|
$this->drupalPost('admin/structure/views/nojs/display/test_store_pager_settings/page_1/pager', $edit, t('Apply'));
|
85
|
$this->drupalGet('admin/structure/views/view/test_store_pager_settings/edit');
|
86
|
$this->assertText('Mini', 'Changed pager plugin, should change some text');
|
87
|
|
88
|
$edit = array(
|
89
|
'pager_options[items_per_page]' => 10,
|
90
|
);
|
91
|
$this->drupalPost('admin/structure/views/nojs/display/test_store_pager_settings/default/pager_options', $edit, t('Apply'));
|
92
|
$this->assertText('20 items');
|
93
|
}
|
94
|
|
95
|
/**
|
96
|
*
|
97
|
*/
|
98
|
public function viewsStorePagerSettings() {
|
99
|
$view = new view();
|
100
|
$view->name = 'test_store_pager_settings';
|
101
|
$view->description = '';
|
102
|
$view->tag = '';
|
103
|
$view->view_php = '';
|
104
|
$view->base_table = 'node';
|
105
|
$view->is_cacheable = FALSE;
|
106
|
$view->api_version = 3;
|
107
|
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
|
108
|
|
109
|
/* Display: Master */
|
110
|
$handler = $view->new_display('default', 'Master', 'default');
|
111
|
$handler->display->display_options['access']['type'] = 'none';
|
112
|
$handler->display->display_options['cache']['type'] = 'none';
|
113
|
$handler->display->display_options['exposed_form']['type'] = 'basic';
|
114
|
$handler->display->display_options['pager']['type'] = 'none';
|
115
|
$handler->display->display_options['style_plugin'] = 'default';
|
116
|
$handler->display->display_options['row_plugin'] = 'node';
|
117
|
return $view;
|
118
|
}
|
119
|
|
120
|
/**
|
121
|
* Tests the none-pager-query.
|
122
|
*/
|
123
|
public function testNoLimit() {
|
124
|
// Create 11 nodes and make sure that everyone is returned. We create 11
|
125
|
// nodes, because the default pager plugin had 10 items per page.
|
126
|
for ($i = 0; $i < 11; $i++) {
|
127
|
$this->drupalCreateNode();
|
128
|
}
|
129
|
$view = $this->viewsPagerNoLimit();
|
130
|
$view->set_display('default');
|
131
|
$this->executeView($view);
|
132
|
$this->assertEqual(count($view->result), 11, 'Make sure that every item is returned in the result');
|
133
|
|
134
|
$view->destroy();
|
135
|
|
136
|
// Setup and test a offset.
|
137
|
$view = $this->viewsPagerNoLimit();
|
138
|
$view->set_display('default');
|
139
|
|
140
|
$pager = array(
|
141
|
'type' => 'none',
|
142
|
'options' => array(
|
143
|
'offset' => 3,
|
144
|
),
|
145
|
);
|
146
|
$view->display_handler->set_option('pager', $pager);
|
147
|
$this->executeView($view);
|
148
|
|
149
|
$this->assertEqual(count($view->result), 8, 'Make sure that every item beside the first three is returned in the result');
|
150
|
|
151
|
// Check some public functions.
|
152
|
$this->assertFalse($view->query->pager->use_pager());
|
153
|
$this->assertFalse($view->query->pager->use_count_query());
|
154
|
$this->assertEqual($view->query->pager->get_items_per_page(), 0);
|
155
|
}
|
156
|
|
157
|
/**
|
158
|
*
|
159
|
*/
|
160
|
public function viewsPagerNoLimit() {
|
161
|
$view = new view();
|
162
|
$view->name = 'test_pager_none';
|
163
|
$view->description = '';
|
164
|
$view->tag = '';
|
165
|
$view->view_php = '';
|
166
|
$view->base_table = 'node';
|
167
|
$view->is_cacheable = FALSE;
|
168
|
$view->api_version = 3;
|
169
|
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
|
170
|
|
171
|
/* Display: Master */
|
172
|
$handler = $view->new_display('default', 'Master', 'default');
|
173
|
$handler->display->display_options['access']['type'] = 'none';
|
174
|
$handler->display->display_options['cache']['type'] = 'none';
|
175
|
$handler->display->display_options['exposed_form']['type'] = 'basic';
|
176
|
$handler->display->display_options['pager']['type'] = 'none';
|
177
|
$handler->display->display_options['style_plugin'] = 'default';
|
178
|
$handler->display->display_options['row_plugin'] = 'node';
|
179
|
return $view;
|
180
|
}
|
181
|
|
182
|
/**
|
183
|
*
|
184
|
*/
|
185
|
public function testViewTotalRowsWithoutPager() {
|
186
|
$this->createNodes(23);
|
187
|
|
188
|
$view = $this->viewsPagerNoLimit();
|
189
|
$view->get_total_rows = TRUE;
|
190
|
$view->set_display('default');
|
191
|
$this->executeView($view);
|
192
|
|
193
|
$this->assertEqual($view->total_rows, 23, "'total_rows' is calculated when pager type is 'none' and 'get_total_rows' is TRUE.");
|
194
|
}
|
195
|
|
196
|
/**
|
197
|
*
|
198
|
*/
|
199
|
public function createNodes($count) {
|
200
|
if ($count >= 0) {
|
201
|
for ($i = 0; $i < $count; $i++) {
|
202
|
$this->drupalCreateNode();
|
203
|
}
|
204
|
}
|
205
|
}
|
206
|
|
207
|
/**
|
208
|
* Tests the some pager plugin.
|
209
|
*/
|
210
|
public function testLimit() {
|
211
|
// Create 11 nodes and make sure that everyone is returned. We create 11
|
212
|
// nodes, because the default pager plugin had 10 items per page.
|
213
|
for ($i = 0; $i < 11; $i++) {
|
214
|
$this->drupalCreateNode();
|
215
|
}
|
216
|
$view = $this->viewsPagerLimit();
|
217
|
$view->set_display('default');
|
218
|
$this->executeView($view);
|
219
|
$this->assertEqual(count($view->result), 5, 'Make sure that only a certain count of items is returned');
|
220
|
$view->destroy();
|
221
|
|
222
|
// Setup and test a offset.
|
223
|
$view = $this->viewsPagerLimit();
|
224
|
$view->set_display('default');
|
225
|
|
226
|
$pager = array(
|
227
|
'type' => 'none',
|
228
|
'options' => array(
|
229
|
'offset' => 8,
|
230
|
'items_per_page' => 5,
|
231
|
),
|
232
|
);
|
233
|
$view->display_handler->set_option('pager', $pager);
|
234
|
$this->executeView($view);
|
235
|
$this->assertEqual(count($view->result), 3, 'Make sure that only a certain count of items is returned');
|
236
|
|
237
|
// Check some public functions.
|
238
|
$this->assertFalse($view->query->pager->use_pager());
|
239
|
$this->assertFalse($view->query->pager->use_count_query());
|
240
|
}
|
241
|
|
242
|
/**
|
243
|
*
|
244
|
*/
|
245
|
public function viewsPagerLimit() {
|
246
|
$view = new view();
|
247
|
$view->name = 'test_pager_some';
|
248
|
$view->description = '';
|
249
|
$view->tag = '';
|
250
|
$view->view_php = '';
|
251
|
$view->base_table = 'node';
|
252
|
$view->is_cacheable = FALSE;
|
253
|
$view->api_version = 3;
|
254
|
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
|
255
|
|
256
|
/* Display: Master */
|
257
|
$handler = $view->new_display('default', 'Master', 'default');
|
258
|
$handler->display->display_options['access']['type'] = 'none';
|
259
|
$handler->display->display_options['cache']['type'] = 'none';
|
260
|
$handler->display->display_options['exposed_form']['type'] = 'basic';
|
261
|
$handler->display->display_options['pager']['type'] = 'some';
|
262
|
$handler->display->display_options['pager']['options']['offset'] = 0;
|
263
|
$handler->display->display_options['pager']['options']['items_per_page'] = 5;
|
264
|
$handler->display->display_options['style_plugin'] = 'default';
|
265
|
$handler->display->display_options['row_plugin'] = 'node';
|
266
|
return $view;
|
267
|
}
|
268
|
|
269
|
/**
|
270
|
* Tests the normal pager.
|
271
|
*/
|
272
|
public function testNormalPager() {
|
273
|
// Create 11 nodes and make sure that everyone is returned. We create 11
|
274
|
// nodes, because the default pager plugin had 10 items per page.
|
275
|
for ($i = 0; $i < 11; $i++) {
|
276
|
$this->drupalCreateNode();
|
277
|
}
|
278
|
$view = $this->viewsPagerFull();
|
279
|
$view->set_display('default');
|
280
|
$this->executeView($view);
|
281
|
$this->assertEqual(count($view->result), 5, 'Make sure that only a certain count of items is returned');
|
282
|
$view->destroy();
|
283
|
|
284
|
// Setup and test a offset.
|
285
|
$view = $this->viewsPagerFull();
|
286
|
$view->set_display('default');
|
287
|
|
288
|
$pager = array(
|
289
|
'type' => 'full',
|
290
|
'options' => array(
|
291
|
'offset' => 8,
|
292
|
'items_per_page' => 5,
|
293
|
),
|
294
|
);
|
295
|
$view->display_handler->set_option('pager', $pager);
|
296
|
$this->executeView($view);
|
297
|
$this->assertEqual(count($view->result), 3, 'Make sure that only a certain count of items is returned');
|
298
|
|
299
|
// Test items per page = 0
|
300
|
$view = $this->viewPagerFullZeroItemsPerPage();
|
301
|
$view->set_display('default');
|
302
|
$this->executeView($view);
|
303
|
|
304
|
$this->assertEqual(count($view->result), 11, 'All items are return');
|
305
|
|
306
|
// @todo test number of pages.
|
307
|
// Test items per page = 0.
|
308
|
$view->destroy();
|
309
|
|
310
|
// Setup and test a offset.
|
311
|
$view = $this->viewsPagerFull();
|
312
|
$view->set_display('default');
|
313
|
|
314
|
$pager = array(
|
315
|
'type' => 'full',
|
316
|
'options' => array(
|
317
|
'offset' => 0,
|
318
|
'items_per_page' => 0,
|
319
|
),
|
320
|
);
|
321
|
|
322
|
$view->display_handler->set_option('pager', $pager);
|
323
|
$this->executeView($view);
|
324
|
$this->assertEqual($view->query->pager->get_items_per_page(), 0);
|
325
|
$this->assertEqual(count($view->result), 11);
|
326
|
}
|
327
|
|
328
|
/**
|
329
|
*
|
330
|
*/
|
331
|
function viewPagerFullZeroItemsPerPage() {
|
332
|
$view = new view();
|
333
|
$view->name = 'view_pager_full_zero_items_per_page';
|
334
|
$view->description = '';
|
335
|
$view->tag = '';
|
336
|
$view->view_php = '';
|
337
|
$view->base_table = 'node';
|
338
|
$view->is_cacheable = FALSE;
|
339
|
$view->api_version = 3;
|
340
|
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
|
341
|
|
342
|
/* Display: Master */
|
343
|
$handler = $view->new_display('default', 'Master', 'default');
|
344
|
$handler->display->display_options['access']['type'] = 'none';
|
345
|
$handler->display->display_options['cache']['type'] = 'none';
|
346
|
$handler->display->display_options['exposed_form']['type'] = 'basic';
|
347
|
$handler->display->display_options['pager']['type'] = 'full';
|
348
|
$handler->display->display_options['pager']['options']['items_per_page'] = '0';
|
349
|
$handler->display->display_options['pager']['options']['offset'] = '0';
|
350
|
$handler->display->display_options['pager']['options']['id'] = '0';
|
351
|
$handler->display->display_options['style_plugin'] = 'default';
|
352
|
$handler->display->display_options['row_plugin'] = 'fields';
|
353
|
/* Field: Content: Title */
|
354
|
$handler->display->display_options['fields']['title']['id'] = 'title';
|
355
|
$handler->display->display_options['fields']['title']['table'] = 'node';
|
356
|
$handler->display->display_options['fields']['title']['field'] = 'title';
|
357
|
$handler->display->display_options['fields']['title']['alter']['alter_text'] = 0;
|
358
|
$handler->display->display_options['fields']['title']['alter']['make_link'] = 0;
|
359
|
$handler->display->display_options['fields']['title']['alter']['trim'] = 0;
|
360
|
$handler->display->display_options['fields']['title']['alter']['word_boundary'] = 1;
|
361
|
$handler->display->display_options['fields']['title']['alter']['ellipsis'] = 1;
|
362
|
$handler->display->display_options['fields']['title']['alter']['strip_tags'] = 0;
|
363
|
$handler->display->display_options['fields']['title']['alter']['html'] = 0;
|
364
|
$handler->display->display_options['fields']['title']['hide_empty'] = 0;
|
365
|
$handler->display->display_options['fields']['title']['empty_zero'] = 0;
|
366
|
$handler->display->display_options['fields']['title']['link_to_node'] = 0;
|
367
|
|
368
|
return $view;
|
369
|
}
|
370
|
|
371
|
/**
|
372
|
*
|
373
|
*/
|
374
|
function viewsPagerFull() {
|
375
|
$view = new view();
|
376
|
$view->name = 'test_pager_full';
|
377
|
$view->description = '';
|
378
|
$view->tag = '';
|
379
|
$view->view_php = '';
|
380
|
$view->base_table = 'node';
|
381
|
$view->is_cacheable = FALSE;
|
382
|
$view->api_version = 3;
|
383
|
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
|
384
|
|
385
|
/* Display: Master */
|
386
|
$handler = $view->new_display('default', 'Master', 'default');
|
387
|
$handler->display->display_options['access']['type'] = 'none';
|
388
|
$handler->display->display_options['cache']['type'] = 'none';
|
389
|
$handler->display->display_options['exposed_form']['type'] = 'basic';
|
390
|
$handler->display->display_options['pager']['type'] = 'full';
|
391
|
$handler->display->display_options['pager']['options']['items_per_page'] = '5';
|
392
|
$handler->display->display_options['pager']['options']['offset'] = '0';
|
393
|
$handler->display->display_options['pager']['options']['id'] = '0';
|
394
|
$handler->display->display_options['style_plugin'] = 'default';
|
395
|
$handler->display->display_options['row_plugin'] = 'node';
|
396
|
|
397
|
return $view;
|
398
|
}
|
399
|
|
400
|
/**
|
401
|
*
|
402
|
*/
|
403
|
function viewsPagerFullFields() {
|
404
|
$view = new view();
|
405
|
$view->name = 'test_pager_full';
|
406
|
$view->description = '';
|
407
|
$view->tag = '';
|
408
|
$view->view_php = '';
|
409
|
$view->base_table = 'node';
|
410
|
$view->is_cacheable = FALSE;
|
411
|
$view->api_version = 3;
|
412
|
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
|
413
|
|
414
|
/* Display: Master */
|
415
|
$handler = $view->new_display('default', 'Master', 'default');
|
416
|
$handler->display->display_options['access']['type'] = 'none';
|
417
|
$handler->display->display_options['cache']['type'] = 'none';
|
418
|
$handler->display->display_options['exposed_form']['type'] = 'basic';
|
419
|
$handler->display->display_options['pager']['type'] = 'full';
|
420
|
$handler->display->display_options['pager']['options']['items_per_page'] = '5';
|
421
|
$handler->display->display_options['pager']['options']['offset'] = '0';
|
422
|
$handler->display->display_options['pager']['options']['id'] = '0';
|
423
|
$handler->display->display_options['style_plugin'] = 'default';
|
424
|
$handler->display->display_options['row_plugin'] = 'fields';
|
425
|
$handler->display->display_options['fields']['title']['id'] = 'title';
|
426
|
$handler->display->display_options['fields']['title']['table'] = 'node';
|
427
|
$handler->display->display_options['fields']['title']['field'] = 'title';
|
428
|
$handler->display->display_options['fields']['title']['alter']['alter_text'] = 0;
|
429
|
$handler->display->display_options['fields']['title']['alter']['make_link'] = 0;
|
430
|
$handler->display->display_options['fields']['title']['alter']['trim'] = 0;
|
431
|
$handler->display->display_options['fields']['title']['alter']['word_boundary'] = 1;
|
432
|
$handler->display->display_options['fields']['title']['alter']['ellipsis'] = 1;
|
433
|
$handler->display->display_options['fields']['title']['alter']['strip_tags'] = 0;
|
434
|
$handler->display->display_options['fields']['title']['alter']['html'] = 0;
|
435
|
$handler->display->display_options['fields']['title']['hide_empty'] = 0;
|
436
|
$handler->display->display_options['fields']['title']['empty_zero'] = 0;
|
437
|
$handler->display->display_options['fields']['title']['link_to_node'] = 0;
|
438
|
return $view;
|
439
|
}
|
440
|
|
441
|
/**
|
442
|
* Tests the minipager.
|
443
|
*/
|
444
|
public function testMiniPager() {
|
445
|
// The functionality is the same as the normal pager, so i don't know what
|
446
|
// to test here.
|
447
|
}
|
448
|
|
449
|
/**
|
450
|
* Tests rendering with NULL pager.
|
451
|
*/
|
452
|
public function testRenderNullPager() {
|
453
|
// Create 11 nodes and make sure that everyone is returned. We create 11
|
454
|
// nodes, because the default pager plugin had 10 items per page.
|
455
|
for ($i = 0; $i < 11; $i++) {
|
456
|
$this->drupalCreateNode();
|
457
|
}
|
458
|
$view = $this->viewsPagerFullFields();
|
459
|
$view->set_display('default');
|
460
|
$this->executeView($view);
|
461
|
$view->use_ajax = TRUE;
|
462
|
// force the value again here.
|
463
|
$view->query->pager = NULL;
|
464
|
$output = $view->render();
|
465
|
$this->assertEqual(preg_match('/<ul class="pager">/', $output), 0, t('The pager is not rendered.'));
|
466
|
}
|
467
|
|
468
|
/**
|
469
|
* Test the api functions on the view object.
|
470
|
*/
|
471
|
function testPagerApi() {
|
472
|
$view = $this->viewsPagerFull();
|
473
|
// On the first round don't initialize the pager.
|
474
|
$this->assertEqual($view->get_items_per_page(), NULL, 'If the pager is not initialized and no manual override there is no items per page.');
|
475
|
$rand_number = rand(1, 5);
|
476
|
$view->set_items_per_page($rand_number);
|
477
|
$this->assertEqual($view->get_items_per_page(), $rand_number, 'Make sure get_items_per_page uses the settings of set_items_per_page.');
|
478
|
|
479
|
$this->assertEqual($view->get_offset(), NULL, 'If the pager is not initialized and no manual override there is no offset.');
|
480
|
$rand_number = rand(1, 5);
|
481
|
$view->set_offset($rand_number);
|
482
|
$this->assertEqual($view->get_offset(), $rand_number, 'Make sure get_offset uses the settings of set_offset.');
|
483
|
|
484
|
$this->assertEqual($view->get_current_page(), NULL, 'If the pager is not initialized and no manual override there is no current page.');
|
485
|
$rand_number = rand(1, 5);
|
486
|
$view->set_current_page($rand_number);
|
487
|
$this->assertEqual($view->get_current_page(), $rand_number, 'Make sure get_current_page uses the settings of set_current_page.');
|
488
|
|
489
|
$view->destroy();
|
490
|
|
491
|
// On this round enable the pager.
|
492
|
$view->init_display();
|
493
|
$view->init_query();
|
494
|
$view->init_pager();
|
495
|
|
496
|
$this->assertEqual($view->get_items_per_page(), 5, 'Per default the view has 5 items per page.');
|
497
|
$rand_number = rand(1, 5);
|
498
|
$view->set_items_per_page($rand_number);
|
499
|
$rand_number = rand(6, 11);
|
500
|
$view->query->pager->set_items_per_page($rand_number);
|
501
|
$this->assertEqual($view->get_items_per_page(), $rand_number, 'Make sure get_items_per_page uses the settings of set_items_per_page.');
|
502
|
|
503
|
$this->assertEqual($view->get_offset(), 0, 'Per default a view has a 0 offset.');
|
504
|
$rand_number = rand(1, 5);
|
505
|
$view->set_offset($rand_number);
|
506
|
$rand_number = rand(6, 11);
|
507
|
$view->query->pager->set_offset($rand_number);
|
508
|
$this->assertEqual($view->get_offset(), $rand_number, 'Make sure get_offset uses the settings of set_offset.');
|
509
|
|
510
|
$this->assertEqual($view->get_current_page(), 0, 'Per default the current page is 0.');
|
511
|
$rand_number = rand(1, 5);
|
512
|
$view->set_current_page($rand_number);
|
513
|
$rand_number = rand(6, 11);
|
514
|
$view->query->pager->set_current_page($rand_number);
|
515
|
$this->assertEqual($view->get_current_page(), $rand_number, 'Make sure get_current_page uses the settings of set_current_page.');
|
516
|
}
|
517
|
|
518
|
}
|