Skip to content

Commit

Permalink
Unwrap pagination array in test fixtures
Browse files Browse the repository at this point in the history
  • Loading branch information
caendesilva committed Jan 8, 2023
1 parent be5bc1f commit 34a9f1f
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 30 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,9 @@ public function test_command_selects_the_right_publication_using_the_names()
'canonicalField' => '__createdAt',
'detailTemplate' => 'detail',
'listTemplate' => 'list',
'pagination' => [
'pageSize' => 10,
'sortField' => '__createdAt',
'sortAscending' => true,
],
'pageSize' => 10,
'sortField' => '__createdAt',
'sortAscending' => true,
'fields' => [],
])
);
Expand Down Expand Up @@ -581,11 +579,9 @@ protected function makeSchemaFile(array $merge = []): void
'canonicalField' => 'title',
'detailTemplate' => 'detail',
'listTemplate' => 'list',
'pagination' => [
'pageSize' => 10,
'sortField' => '__createdAt',
'sortAscending' => true,
],
'pageSize' => 10,
'sortField' => '__createdAt',
'sortAscending' => true,
'fields' => [
[
'name' => 'title',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,9 @@ public function test_command_creates_publication_type()
"canonicalField": "publication-title",
"detailTemplate": "detail.blade.php",
"listTemplate": "list.blade.php",
"pagination": {
"sortField": "__createdAt",
"sortAscending": true,
"pageSize": 10
},
"sortField": "__createdAt",
"sortAscending": true,
"pageSize": 10,
"fields": [
{
"type": "datetime",
Expand Down Expand Up @@ -183,11 +181,9 @@ public function testWithTagFieldInput()
"canonicalField": "__createdAt",
"detailTemplate": "detail.blade.php",
"listTemplate": "list.blade.php",
"pagination": {
"sortField": "__createdAt",
"sortAscending": true,
"pageSize": 25
},
"sortField": "__createdAt",
"sortAscending": true,
"pageSize": 25,
"fields": [
{
"type": "datetime",
Expand Down
8 changes: 3 additions & 5 deletions packages/framework/tests/Feature/PublicationListPageTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,9 @@ protected function getTestData(): array
'canonicalField' => 'canonical',
'detailTemplate' => 'detail.blade.php',
'listTemplate' => 'list.blade.php',
'pagination' => [
'sortField' => 'sort',
'sortAscending' => true,
'pageSize' => 10,
],
'sortField' => 'sort',
'sortAscending' => true,
'pageSize' => 10,
'fields' => [
[
'type' => 'string',
Expand Down
8 changes: 3 additions & 5 deletions packages/framework/tests/Feature/PublicationPageTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -118,11 +118,9 @@ protected function createRealPublicationFiles(): void
"canonicalField": "slug",
"detailTemplate": "test_detail.blade.php",
"listTemplate": "test_list.blade.php",
"pagination": {
"sortField": "__createdAt",
"sortAscending": true,
"pageSize": 0
},
"sortField": "__createdAt",
"sortAscending": true,
"pageSize": 0,
"fields": [
{
"name": "slug",
Expand Down

0 comments on commit 34a9f1f

Please sign in to comment.