From f9f30f7b37be82ac5e053cc05883da8de2de4b61 Mon Sep 17 00:00:00 2001 From: Caen De Silva Date: Wed, 28 Dec 2022 13:56:18 +0100 Subject: [PATCH] Fix publication type generator to properly specify the template files --- .../src/Framework/Actions/CreatesNewPublicationType.php | 4 ++-- .../Feature/Actions/CreatesNewPublicationTypeTest.php | 8 ++++---- .../Feature/Commands/MakePublicationTypeCommandTest.php | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/packages/framework/src/Framework/Actions/CreatesNewPublicationType.php b/packages/framework/src/Framework/Actions/CreatesNewPublicationType.php index bdabf351f30..24ef2c87a7d 100644 --- a/packages/framework/src/Framework/Actions/CreatesNewPublicationType.php +++ b/packages/framework/src/Framework/Actions/CreatesNewPublicationType.php @@ -39,8 +39,8 @@ protected function handleCreate(): void (new PublicationType( $this->name, $this->canonicalField ?? '__createdAt', - 'detail', - 'list', + 'detail.blade.php', + 'list.blade.php', [ $this->sortField ?? '__createdAt', $this->sortAscending ?? true, diff --git a/packages/framework/tests/Feature/Actions/CreatesNewPublicationTypeTest.php b/packages/framework/tests/Feature/Actions/CreatesNewPublicationTypeTest.php index 9c75b77acaa..9e1c191dab2 100644 --- a/packages/framework/tests/Feature/Actions/CreatesNewPublicationTypeTest.php +++ b/packages/framework/tests/Feature/Actions/CreatesNewPublicationTypeTest.php @@ -43,8 +43,8 @@ public function test_it_creates_a_new_publication_type() { "name": "Test Publication", "canonicalField": "canonical", - "detailTemplate": "detail", - "listTemplate": "list", + "detailTemplate": "detail.blade.php", + "listTemplate": "list.blade.php", "pagination": { "sortField": "sort", "sortAscending": false, @@ -70,8 +70,8 @@ public function test_create_with_default_parameters() { "name": "Test Publication", "canonicalField": "__createdAt", - "detailTemplate": "detail", - "listTemplate": "list", + "detailTemplate": "detail.blade.php", + "listTemplate": "list.blade.php", "pagination": { "sortField": "__createdAt", "sortAscending": true, diff --git a/packages/framework/tests/Feature/Commands/MakePublicationTypeCommandTest.php b/packages/framework/tests/Feature/Commands/MakePublicationTypeCommandTest.php index 824e9d74642..7068483b8b1 100644 --- a/packages/framework/tests/Feature/Commands/MakePublicationTypeCommandTest.php +++ b/packages/framework/tests/Feature/Commands/MakePublicationTypeCommandTest.php @@ -74,8 +74,8 @@ public function test_command_creates_publication_type() { "name": "Test Publication", "canonicalField": "publication-title", - "detailTemplate": "detail", - "listTemplate": "list", + "detailTemplate": "detail.blade.php", + "listTemplate": "list.blade.php", "pagination": { "sortField": "__createdAt", "sortAscending": true,