From 34e8b2399026a04b271320c55af152f0c65cc2fa Mon Sep 17 00:00:00 2001 From: edalzell Date: Fri, 13 Dec 2024 10:34:52 -0800 Subject: [PATCH] fix tests --- tests/Fields/BlueprintTest.php | 4 ++++ tests/Fields/FieldsTest.php | 4 ++++ tests/Fields/SectionTest.php | 2 ++ tests/Fields/TabTest.php | 2 ++ tests/Fieldtypes/NestedFieldsTest.php | 2 ++ tests/Fieldtypes/SetsTest.php | 3 +++ 6 files changed, 17 insertions(+) diff --git a/tests/Fields/BlueprintTest.php b/tests/Fields/BlueprintTest.php index a13c952be8..60e59d5139 100644 --- a/tests/Fields/BlueprintTest.php +++ b/tests/Fields/BlueprintTest.php @@ -436,6 +436,7 @@ public function converts_to_array_suitable_for_rendering_fields_in_publish_compo 'visibility' => 'visible', 'replicator_preview' => true, 'duplicate' => true, + 'revisable' => true, 'type' => 'text', 'validate' => 'required|min:2', 'input_type' => 'text', @@ -474,6 +475,7 @@ public function converts_to_array_suitable_for_rendering_fields_in_publish_compo 'visibility' => 'visible', 'replicator_preview' => true, 'duplicate' => true, + 'revisable' => true, 'type' => 'textarea', 'placeholder' => null, 'validate' => 'min:2', @@ -563,6 +565,7 @@ public function converts_to_array_suitable_for_rendering_prefixed_conditional_fi 'visibility' => 'visible', 'replicator_preview' => true, 'duplicate' => true, + 'revisable' => true, 'type' => 'text', 'input_type' => 'text', 'placeholder' => null, @@ -589,6 +592,7 @@ public function converts_to_array_suitable_for_rendering_prefixed_conditional_fi 'visibility' => 'visible', 'replicator_preview' => true, 'duplicate' => true, + 'revisable' => true, 'type' => 'text', 'input_type' => 'text', 'placeholder' => null, diff --git a/tests/Fields/FieldsTest.php b/tests/Fields/FieldsTest.php index 057bc08d2a..fddcdcd290 100644 --- a/tests/Fields/FieldsTest.php +++ b/tests/Fields/FieldsTest.php @@ -434,6 +434,7 @@ public function converts_to_array_suitable_for_rendering_fields_in_publish_compo 'sortable' => true, 'replicator_preview' => true, 'duplicate' => true, + 'revisable' => true, ], [ 'handle' => 'two', @@ -457,6 +458,7 @@ public function converts_to_array_suitable_for_rendering_fields_in_publish_compo 'sortable' => true, 'replicator_preview' => true, 'duplicate' => true, + 'revisable' => true, ], ], $fields->toPublishArray()); } @@ -522,6 +524,7 @@ public function converts_to_array_suitable_for_rendering_prefixed_conditional_fi 'sortable' => true, 'replicator_preview' => true, 'duplicate' => true, + 'revisable' => true, ], [ 'handle' => 'nested_deeper_two', @@ -548,6 +551,7 @@ public function converts_to_array_suitable_for_rendering_prefixed_conditional_fi 'sortable' => true, 'replicator_preview' => true, 'duplicate' => true, + 'revisable' => true, ], ], $fields->toPublishArray()); } diff --git a/tests/Fields/SectionTest.php b/tests/Fields/SectionTest.php index 0e09f08b90..0afb84b986 100644 --- a/tests/Fields/SectionTest.php +++ b/tests/Fields/SectionTest.php @@ -125,6 +125,7 @@ public function converts_to_array_suitable_for_rendering_fields_in_publish_compo 'visibility' => 'visible', 'replicator_preview' => true, 'duplicate' => true, + 'revisable' => true, 'type' => 'text', 'validate' => 'required|min:2', 'input_type' => 'text', @@ -152,6 +153,7 @@ public function converts_to_array_suitable_for_rendering_fields_in_publish_compo 'visibility' => 'visible', 'replicator_preview' => true, 'duplicate' => true, + 'revisable' => true, 'type' => 'textarea', 'validate' => 'min:2', 'placeholder' => null, diff --git a/tests/Fields/TabTest.php b/tests/Fields/TabTest.php index ad0d34d3bc..f6f1b0c98c 100644 --- a/tests/Fields/TabTest.php +++ b/tests/Fields/TabTest.php @@ -150,6 +150,7 @@ public function converts_to_array_suitable_for_rendering_fields_in_publish_compo 'visibility' => 'visible', 'replicator_preview' => true, 'duplicate' => true, + 'revisable' => true, 'type' => 'text', 'validate' => 'required|min:2', 'input_type' => 'text', @@ -177,6 +178,7 @@ public function converts_to_array_suitable_for_rendering_fields_in_publish_compo 'visibility' => 'visible', 'replicator_preview' => true, 'duplicate' => true, + 'revisable' => true, 'type' => 'textarea', 'validate' => 'min:2', 'placeholder' => null, diff --git a/tests/Fieldtypes/NestedFieldsTest.php b/tests/Fieldtypes/NestedFieldsTest.php index d35817067a..5f20838d86 100644 --- a/tests/Fieldtypes/NestedFieldsTest.php +++ b/tests/Fieldtypes/NestedFieldsTest.php @@ -23,6 +23,7 @@ public function it_preprocesses_each_value_when_used_for_config() ->andReturn(new class extends Fieldtype { protected $component = 'assets'; + protected $configFields = [ 'max_files' => ['type' => 'integer'], 'container' => ['type' => 'plain'], @@ -84,6 +85,7 @@ public function preProcess($data) 'visibility' => 'visible', 'replicator_preview' => true, 'duplicate' => true, + 'revisable' => true, 'type' => 'assets', 'max_files' => 2, 'container' => 'main', diff --git a/tests/Fieldtypes/SetsTest.php b/tests/Fieldtypes/SetsTest.php index e57b713568..f0e29b94cd 100644 --- a/tests/Fieldtypes/SetsTest.php +++ b/tests/Fieldtypes/SetsTest.php @@ -227,6 +227,7 @@ public function it_preprocesses_for_config_with_groups() 'visibility' => 'visible', 'replicator_preview' => true, 'duplicate' => true, + 'revisable' => true, 'type' => 'text', 'input_type' => 'text', 'placeholder' => null, @@ -264,6 +265,7 @@ public function it_preprocesses_for_config_with_groups() 'visibility' => 'visible', 'replicator_preview' => true, 'duplicate' => true, + 'revisable' => true, 'type' => 'text', 'input_type' => 'text', 'placeholder' => null, @@ -324,6 +326,7 @@ public function it_preprocesses_for_config_without_groups() 'visibility' => 'visible', 'replicator_preview' => true, 'duplicate' => true, + 'revisable' => true, 'type' => 'text', 'input_type' => 'text', 'placeholder' => null,