Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 589d993

Browse files
committed
Fixed some tests
1 parent 4b4613e commit 589d993

4 files changed

Lines changed: 22 additions & 20 deletions

File tree

Tests/Configuration/ConfigManagerTest.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,9 @@ function ($filePath) {
8484

8585
private function isTestCompatible($filePath)
8686
{
87-
if (2 !== Kernel::MAJOR_VERSION || 3 !== Kernel::MINOR_VERSION) {
87+
// the (int) casting is needed because older Symfony versions used
88+
// strings to store the version numbers (e.g. '2' instead of 2)
89+
if (2 !== (int) Kernel::MAJOR_VERSION || 3 !== (int) Kernel::MINOR_VERSION) {
8890
return true;
8991
}
9092

Tests/Controller/CustomizedBackendTest.php

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -195,9 +195,9 @@ public function testShowViewListActionReferer()
195195
$parameters = array(
196196
'action' => 'list',
197197
'entity' => 'Category',
198-
'page' => '2',
199-
'sortDirection' => 'ASC',
200198
'sortField' => 'name',
199+
'sortDirection' => 'ASC',
200+
'page' => '2',
201201
);
202202

203203
// 1. visit a specific 'list' view page
@@ -226,9 +226,9 @@ public function testChainedReferer()
226226
$parameters = array(
227227
'action' => 'list',
228228
'entity' => 'Category',
229-
'page' => '2',
230-
'sortDirection' => 'ASC',
231229
'sortField' => 'name',
230+
'sortDirection' => 'ASC',
231+
'page' => '2',
232232
);
233233

234234
// 1. visit a specific 'list' view page
@@ -312,9 +312,9 @@ public function testEditViewListActionReferer()
312312
$parameters = array(
313313
'action' => 'list',
314314
'entity' => 'Category',
315-
'page' => '2',
316-
'sortDirection' => 'ASC',
317315
'sortField' => 'name',
316+
'sortDirection' => 'ASC',
317+
'page' => '2',
318318
);
319319

320320
// 1. visit a specific 'list' view page
@@ -393,9 +393,9 @@ public function testNewViewListActionReferer()
393393
$parameters = array(
394394
'action' => 'list',
395395
'entity' => 'Category',
396-
'page' => '2',
397-
'sortDirection' => 'ASC',
398396
'sortField' => 'name',
397+
'sortDirection' => 'ASC',
398+
'page' => '2',
399399
);
400400

401401
// 1. visit a specific 'list' view page
@@ -538,10 +538,10 @@ public function testSearchViewShowActionReferer()
538538
$parameters = array(
539539
'action' => 'search',
540540
'entity' => 'Category',
541+
'sortField' => 'name',
542+
'sortDirection' => 'ASC',
541543
'page' => '2',
542544
'query' => 'cat',
543-
'sortDirection' => 'ASC',
544-
'sortField' => 'name',
545545
);
546546

547547
// 1. visit a specific 'search' view page

Tests/Controller/DefaultBackendTest.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -283,9 +283,9 @@ public function testShowViewReferer()
283283
$parameters = array(
284284
'action' => 'list',
285285
'entity' => 'Category',
286-
'page' => '2',
287-
'sortDirection' => 'ASC',
288286
'sortField' => 'name',
287+
'sortDirection' => 'ASC',
288+
'page' => '2',
289289
);
290290

291291
// 1. visit a specific 'list' view page
@@ -363,9 +363,9 @@ public function testEditViewReferer()
363363
$parameters = array(
364364
'action' => 'list',
365365
'entity' => 'Category',
366-
'page' => '2',
367-
'sortDirection' => 'ASC',
368366
'sortField' => 'name',
367+
'sortDirection' => 'ASC',
368+
'page' => '2',
369369
);
370370

371371
// 1. visit a specific 'list' view page
@@ -480,9 +480,9 @@ public function testNewViewReferer()
480480
$parameters = array(
481481
'action' => 'list',
482482
'entity' => 'Category',
483-
'page' => '2',
484-
'sortDirection' => 'ASC',
485483
'sortField' => 'name',
484+
'sortDirection' => 'ASC',
485+
'page' => '2',
486486
);
487487

488488
// 1. visit a specific 'list' view page
@@ -626,10 +626,10 @@ public function testSearchViewShowActionReferer()
626626
$parameters = array(
627627
'action' => 'search',
628628
'entity' => 'Category',
629+
'sortField' => 'name',
630+
'sortDirection' => 'ASC',
629631
'page' => '2',
630632
'query' => 'cat',
631-
'sortDirection' => 'ASC',
632-
'sortField' => 'name',
633633
);
634634

635635
// 1. visit a specific 'search' view page

Tests/DataCollector/EasyAdminDataCollectorTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public function testCollectorInformationForEditView()
6565
$parameters = array(
6666
'action' => 'edit',
6767
'entity' => 'Category',
68-
'id' => 200,
68+
'id' => '200',
6969
'sort_field' => 'id',
7070
'sort_direction' => 'DESC',
7171
);

0 commit comments

Comments
 (0)