From 0427f70ac015eae980c1b3826160422ea218c192 Mon Sep 17 00:00:00 2001 From: ADmad Date: Sat, 30 Nov 2024 01:12:02 +0530 Subject: [PATCH 1/2] Drop use of defunct "form-group" class. It no longer exists in Bootstrap 5. --- src/View/Helper/FormHelper.php | 61 +++---- .../DefaultAlign/CheckboxControlTest.php | 34 ++-- .../DefaultAlign/ColorControlTest.php | 26 +-- .../DefaultAlign/DateTimeControlTest.php | 42 ++--- .../DefaultAlign/FileControlTest.php | 32 ++-- .../MultipleCheckboxControlTest.php | 108 ++++++------ .../DefaultAlign/RadioControlTest.php | 58 +++---- .../DefaultAlign/RangeControlTest.php | 26 +-- .../DefaultAlign/SelectControlTest.php | 32 ++-- .../DefaultAlign/StaticControlTest.php | 28 ++-- .../DefaultAlign/TextControlTest.php | 32 ++-- .../HorizontalAlign/CheckboxControlTest.php | 58 +++---- .../HorizontalAlign/ColorControlTest.php | 26 +-- .../HorizontalAlign/DateTimeControlTest.php | 42 ++--- .../HorizontalAlign/FileControlTest.php | 32 ++-- .../MultipleCheckboxControlTest.php | 106 ++++++------ .../HorizontalAlign/RadioControlTest.php | 60 +++---- .../HorizontalAlign/RangeControlTest.php | 26 +-- .../HorizontalAlign/SelectControlTest.php | 32 ++-- .../HorizontalAlign/StaticControlTest.php | 28 ++-- .../HorizontalAlign/SubmitControlTest.php | 4 +- .../HorizontalAlign/TextControlTest.php | 32 ++-- .../InlineAlign/ColorControlTest.php | 24 +-- .../InlineAlign/DateTimeControlTest.php | 40 ++--- .../InlineAlign/FileControlTest.php | 30 ++-- .../MultipleCheckboxControlTest.php | 44 ++--- .../InlineAlign/RadioControlTest.php | 30 ++-- .../InlineAlign/RangeControlTest.php | 24 +-- .../InlineAlign/SelectControlTest.php | 30 ++-- .../InlineAlign/StaticControlTest.php | 26 +-- .../InlineAlign/TextControlTest.php | 32 ++-- tests/TestCase/View/Helper/FormHelperTest.php | 154 ++++++------------ tests/test_app/config/custom_templates.php | 2 +- 33 files changed, 647 insertions(+), 714 deletions(-) diff --git a/src/View/Helper/FormHelper.php b/src/View/Helper/FormHelper.php index 21b90a91..be7582a8 100644 --- a/src/View/Helper/FormHelper.php +++ b/src/View/Helper/FormHelper.php @@ -148,18 +148,18 @@ class FormHelper extends CoreFormHelper '{{input}}{{label}}', 'inputContainer' => '{{content}}{{help}}', + 'class="{{containerClass}}{{type}}{{required}}">{{content}}{{help}}', 'inputContainerError' => '' . + 'class="{{containerClass}}{{formGroupPosition}}{{type}}{{required}} is-invalid">' . '{{content}}{{error}}{{help}}', 'checkboxContainer' => '{{content}}{{help}}', 'checkboxContainerError' => '' . '{{content}}{{error}}{{help}}', 'checkboxInlineContainer' => @@ -177,11 +177,11 @@ class FormHelper extends CoreFormHelper 'checkboxInlineWrapper' => '
{{label}}
', 'radioContainer' => - '{{content}}{{help}}', 'radioContainerError' => '{{content}}{{error}}{{help}}', 'radioLabel' => '{{text}}{{tooltip}}', @@ -196,16 +196,16 @@ class FormHelper extends CoreFormHelper 'inputGroupText' => '{{content}}', 'multicheckboxContainer' => - '{{content}}{{help}}', 'multicheckboxContainerError' => '{{content}}{{error}}{{help}}', 'multicheckboxLabel' => '{{text}}{{tooltip}}', 'multicheckboxWrapper' => - '
{{content}}
', + '
{{content}}
', 'multicheckboxTitle' => '{{text}}', 'nestingLabel' => @@ -236,31 +236,28 @@ class FormHelper extends CoreFormHelper '{{formGroupPosition}}{{type}}{{required}} is-invalid">{{content}}{{error}}{{help}}', 'radioContainer' => '' . '{{content}}{{help}}', 'radioContainerError' => '' . '{{content}}{{error}}{{help}}', 'radioLabel' => '{{text}}{{tooltip}}', 'multicheckboxContainer' => '{{content}}{{help}}', 'multicheckboxContainerError' => '{{content}}{{error}}{{help}}', 'multicheckboxLabel' => '{{text}}{{tooltip}}', 'multicheckboxWrapper' => - '
{{content}}
', + '
{{content}}
', 'multicheckboxTitle' => '{{text}}', ], @@ -276,46 +273,37 @@ class FormHelper extends CoreFormHelper 'checkboxInlineFormGroup' => '
{{input}}{{label}}
', 'submitContainer' => - '' . - '
{{content}}
', + '
{{content}}
', 'inputContainer' => - '' . + '' . '{{content}}', 'inputContainerError' => '' . + 'class="{{containerClass}}row {{formGroupPosition}}{{type}}{{required}} is-invalid">' . '{{content}}', 'checkboxContainer' => - '' . - '{{content}}', + '{{content}}', 'checkboxContainerError' => - '' . '{{content}}', 'radioContainer' => - '' . '{{content}}', 'radioContainerError' => - '' . '{{content}}', 'radioLabel' => '{{text}}{{tooltip}}', 'multicheckboxContainer' => - '' . '{{content}}', 'multicheckboxContainerError' => - '' . '{{content}}', @@ -591,9 +579,6 @@ protected function _containerOptions(?string $fieldName, array $options): array $containerOptions = $options['container'] ?? []; unset($options['container']); - $options['templateVars']['formGroupClass'] = $containerOptions['formGroupClass'] ?? 'form-group'; - unset($containerOptions['formGroupClass']); - if (isset($containerOptions['class'])) { $options['templateVars']['containerClass'] = $containerOptions['class'] . ' '; unset($containerOptions['class']); diff --git a/tests/TestCase/View/Helper/FormHelper/DefaultAlign/CheckboxControlTest.php b/tests/TestCase/View/Helper/FormHelper/DefaultAlign/CheckboxControlTest.php index aa40e364..096842ce 100644 --- a/tests/TestCase/View/Helper/FormHelper/DefaultAlign/CheckboxControlTest.php +++ b/tests/TestCase/View/Helper/FormHelper/DefaultAlign/CheckboxControlTest.php @@ -15,7 +15,7 @@ public function testDefaultAlignCheckboxControl() 'type' => 'checkbox', ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group form-check checkbox']], + ['div' => ['class' => 'mb-3 form-check checkbox']], ['input' => [ 'type' => 'hidden', 'name' => 'users', @@ -45,7 +45,7 @@ public function testDefaultAlignCheckboxControlWithDisabledLabel() 'label' => false, ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group form-check checkbox']], + ['div' => ['class' => 'mb-3 form-check checkbox']], ['input' => [ 'type' => 'hidden', 'name' => 'users', @@ -72,7 +72,7 @@ public function testDefaultAlignCheckboxControlWithCustomLabel() 'label' => 'Custom Label', ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group form-check checkbox']], + ['div' => ['class' => 'mb-3 form-check checkbox']], ['input' => [ 'type' => 'hidden', 'name' => 'users', @@ -106,7 +106,7 @@ public function testDefaultAlignCheckboxControlWithCustomLabelOptions() ], ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group form-check checkbox']], + ['div' => ['class' => 'mb-3 form-check checkbox']], ['input' => [ 'type' => 'hidden', 'name' => 'users', @@ -140,7 +140,7 @@ public function testDefaultAlignCheckboxControlWithHelp() 'help' => 'Help text', ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group form-check checkbox']], + ['div' => ['class' => 'mb-3 form-check checkbox']], ['input' => [ 'type' => 'hidden', 'name' => 'users', @@ -179,7 +179,7 @@ public function testDefaultAlignCheckboxControlWithHelpOptions() ], ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group form-check checkbox']], + ['div' => ['class' => 'mb-3 form-check checkbox']], ['input' => [ 'type' => 'hidden', 'name' => 'users', @@ -217,7 +217,7 @@ public function testDefaultAlignCheckboxControlWithTooltip() 'tooltip' => 'Tooltip text', ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group form-check checkbox']], + ['div' => ['class' => 'mb-3 form-check checkbox']], ['input' => [ 'type' => 'hidden', 'name' => 'users', @@ -253,7 +253,7 @@ public function testDefaultAlignCheckboxControlWithCustomSpacing() 'spacing' => 'custom-spacing', ]); $expected = [ - ['div' => ['class' => 'custom-spacing form-group form-check checkbox']], + ['div' => ['class' => 'custom-spacing form-check checkbox']], ['input' => [ 'type' => 'hidden', 'name' => 'users', @@ -285,7 +285,7 @@ public function testDefaultAlignCheckboxControlWithError() 'type' => 'checkbox', ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group form-check checkbox is-invalid']], + ['div' => ['class' => 'mb-3 form-check checkbox is-invalid']], ['input' => [ 'class' => 'is-invalid', 'type' => 'hidden', @@ -325,7 +325,7 @@ public function testDefaultAlignCheckboxControlWithErrorAndHelp() 'help' => 'Help text', ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group form-check checkbox is-invalid']], + ['div' => ['class' => 'mb-3 form-check checkbox is-invalid']], ['input' => [ 'class' => 'is-invalid', 'type' => 'hidden', @@ -372,7 +372,7 @@ public function testDefaultAlignCheckboxControlWithErrorAndHelpAndOptions() ], ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group form-check checkbox is-invalid']], + ['div' => ['class' => 'mb-3 form-check checkbox is-invalid']], ['input' => [ 'class' => 'is-invalid', 'type' => 'hidden', @@ -420,7 +420,7 @@ public function testDefaultAlignCheckboxControlContainerOptions() $expected = [ ['div' => [ 'attribute' => 'container-attribute', - 'class' => 'container-class mb-3 form-group form-check checkbox', + 'class' => 'container-class mb-3 form-check checkbox', ]], ['input' => [ 'type' => 'hidden', @@ -459,7 +459,7 @@ public function testDefaultAlignCheckboxControlContainerOptionsWithError() $expected = [ ['div' => [ 'attribute' => 'container-attribute', - 'class' => 'container-class mb-3 form-group form-check checkbox is-invalid', + 'class' => 'container-class mb-3 form-check checkbox is-invalid', ]], ['input' => [ 'class' => 'is-invalid', @@ -497,7 +497,7 @@ public function testDefaultAlignCheckboxControlNestedInput() 'nestedInput' => true, ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group form-check checkbox']], + ['div' => ['class' => 'mb-3 form-check checkbox']], ['input' => [ 'type' => 'hidden', 'name' => 'users', @@ -528,7 +528,7 @@ public function testDefaultAlignCheckboxControlNestedInputWithTooltip() 'tooltip' => 'Tooltip text', ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group form-check checkbox']], + ['div' => ['class' => 'mb-3 form-check checkbox']], ['input' => [ 'type' => 'hidden', 'name' => 'users', @@ -567,7 +567,7 @@ public function testDefaultAlignCheckboxControlNestedInputWithError() 'nestedInput' => true, ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group form-check checkbox is-invalid']], + ['div' => ['class' => 'mb-3 form-check checkbox is-invalid']], ['input' => [ 'class' => 'is-invalid', 'type' => 'hidden', @@ -1041,7 +1041,7 @@ public function testDefaultAlignCheckboxControlSwitch() 'switch' => true, ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group form-check form-switch checkbox']], + ['div' => ['class' => 'mb-3 form-check form-switch checkbox']], ['input' => [ 'type' => 'hidden', 'name' => 'users', diff --git a/tests/TestCase/View/Helper/FormHelper/DefaultAlign/ColorControlTest.php b/tests/TestCase/View/Helper/FormHelper/DefaultAlign/ColorControlTest.php index daeee542..ba8b251e 100644 --- a/tests/TestCase/View/Helper/FormHelper/DefaultAlign/ColorControlTest.php +++ b/tests/TestCase/View/Helper/FormHelper/DefaultAlign/ColorControlTest.php @@ -16,7 +16,7 @@ public function testDefaultAlignColorControl() 'value' => '#ffffff', ]); $expected = [ - 'div' => ['class' => 'mb-3 form-group color'], + 'div' => ['class' => 'mb-3 color'], ['label' => ['class' => 'form-label', 'for' => 'color']], 'Color', '/label', @@ -42,7 +42,7 @@ public function testDefaultAlignColorControlWithDisabledLabel() 'label' => false, ]); $expected = [ - 'div' => ['class' => 'mb-3 form-group color'], + 'div' => ['class' => 'mb-3 color'], 'input' => [ 'type' => 'color', 'name' => 'color', @@ -65,7 +65,7 @@ public function testDefaultAlignColorControlWithCustomLabel() 'label' => 'Custom Label', ]); $expected = [ - 'div' => ['class' => 'mb-3 form-group color'], + 'div' => ['class' => 'mb-3 color'], ['label' => ['class' => 'form-label', 'for' => 'color']], 'Custom Label', '/label', @@ -95,7 +95,7 @@ public function testDefaultAlignColorControlWithCustomLabelOptions() ], ]); $expected = [ - 'div' => ['class' => 'mb-3 form-group color'], + 'div' => ['class' => 'mb-3 color'], 'label' => ['for' => 'color', 'class' => 'custom-label-class form-label', 'foo' => 'bar'], 'Custom Label', '/label', @@ -121,7 +121,7 @@ public function testDefaultAlignColorControlWithHelp() 'help' => 'Help text', ]); $expected = [ - 'div' => ['class' => 'mb-3 form-group color'], + 'div' => ['class' => 'mb-3 color'], ['label' => ['class' => 'form-label', 'for' => 'color']], 'Color', '/label', @@ -156,7 +156,7 @@ public function testDefaultAlignColorControlWithHelpOptions() ], ]); $expected = [ - 'div' => ['class' => 'mb-3 form-group color'], + 'div' => ['class' => 'mb-3 color'], ['label' => ['class' => 'form-label', 'for' => 'color']], 'Color', '/label', @@ -190,7 +190,7 @@ public function testDefaultAlignColorControlWithTooltip() 'tooltip' => 'Tooltip text', ]); $expected = [ - 'div' => ['class' => 'mb-3 form-group color'], + 'div' => ['class' => 'mb-3 color'], ['label' => ['class' => 'form-label', 'for' => 'color']], 'Color', 'span' => [ @@ -222,7 +222,7 @@ public function testDefaultAlignColorControlWithCustomSpacing() 'spacing' => 'custom-spacing', ]); $expected = [ - 'div' => ['class' => 'custom-spacing form-group color'], + 'div' => ['class' => 'custom-spacing color'], ['label' => ['class' => 'form-label', 'for' => 'color']], 'Color', '/label', @@ -250,7 +250,7 @@ public function testDefaultAlignColorControlWithError() 'value' => '#ffffff', ]); $expected = [ - 'div' => ['class' => 'mb-3 form-group color is-invalid'], + 'div' => ['class' => 'mb-3 color is-invalid'], ['label' => ['class' => 'form-label', 'for' => 'color']], 'Color', '/label', @@ -284,7 +284,7 @@ public function testDefaultAlignColorControlWithErrorAndHelp() 'help' => 'Help text', ]); $expected = [ - 'div' => ['class' => 'mb-3 form-group color is-invalid'], + 'div' => ['class' => 'mb-3 color is-invalid'], ['label' => ['class' => 'form-label', 'for' => 'color']], 'Color', '/label', @@ -326,7 +326,7 @@ public function testDefaultAlignColorControlWithErrorAndHelpOptions() ], ]); $expected = [ - 'div' => ['class' => 'mb-3 form-group color is-invalid'], + 'div' => ['class' => 'mb-3 color is-invalid'], ['label' => ['class' => 'form-label', 'for' => 'color']], 'Color', '/label', @@ -370,7 +370,7 @@ public function testDefaultAlignColorControlContainerOptions() $expected = [ 'div' => [ 'attribute' => 'container-attribute', - 'class' => 'container-class mb-3 form-group color', + 'class' => 'container-class mb-3 color', ], ['label' => ['class' => 'form-label', 'for' => 'color']], 'Color', @@ -406,7 +406,7 @@ public function testDefaultAlignColorControlContainerOptionsWithError() $expected = [ 'div' => [ 'attribute' => 'container-attribute', - 'class' => 'container-class mb-3 form-group color is-invalid', + 'class' => 'container-class mb-3 color is-invalid', ], ['label' => ['class' => 'form-label', 'for' => 'color']], 'Color', diff --git a/tests/TestCase/View/Helper/FormHelper/DefaultAlign/DateTimeControlTest.php b/tests/TestCase/View/Helper/FormHelper/DefaultAlign/DateTimeControlTest.php index a2e3d499..a3668539 100644 --- a/tests/TestCase/View/Helper/FormHelper/DefaultAlign/DateTimeControlTest.php +++ b/tests/TestCase/View/Helper/FormHelper/DefaultAlign/DateTimeControlTest.php @@ -20,7 +20,7 @@ public function testDefaultAlignDateTimeControl() ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group datetime-local']], + ['div' => ['class' => 'mb-3 datetime-local']], ['label' => ['class' => 'form-label', 'for' => 'created']], 'Created', '/label', @@ -50,7 +50,7 @@ public function testDefaultAlignDateTimeControlWithDisabledLabel() $expected = [ ['div' => [ - 'class' => 'mb-3 form-group datetime-local', + 'class' => 'mb-3 datetime-local', ]], 'input' => [ 'type' => 'datetime-local', @@ -78,7 +78,7 @@ public function testDefaultAlignDateTimeControlWithCustomLabel() $expected = [ ['div' => [ - 'class' => 'mb-3 form-group datetime-local', + 'class' => 'mb-3 datetime-local', ]], ['label' => ['class' => 'form-label', 'for' => 'created']], 'Custom Label', @@ -113,7 +113,7 @@ public function testDefaultAlignDateTimeControlWithCustomLabelOptions() $expected = [ ['div' => [ - 'class' => 'mb-3 form-group datetime-local', + 'class' => 'mb-3 datetime-local', ]], ['label' => [ 'class' => 'custom-label-class form-label', @@ -146,7 +146,7 @@ public function testDefaultAlignDateTimeControlWithHelp() 'help' => 'Help text', ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group time']], + ['div' => ['class' => 'mb-3 time']], ['label' => ['class' => 'form-label', 'for' => 'created']], 'Created', '/label', @@ -184,7 +184,7 @@ public function testDefaultAlignDateTimeControlWithHelpOptions() ], ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group time']], + ['div' => ['class' => 'mb-3 time']], ['label' => ['class' => 'form-label', 'for' => 'created']], 'Created', '/label', @@ -221,7 +221,7 @@ public function testDefaultAlignDateTimeControlWithTooltip() 'tooltip' => 'Tooltip text', ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group time']], + ['div' => ['class' => 'mb-3 time']], ['label' => ['class' => 'form-label', 'for' => 'created']], 'Created ', 'span' => [ @@ -257,7 +257,7 @@ public function testDefaultAlignDateTimeControlWithCustomSpacing() ]); $expected = [ - ['div' => ['class' => 'custom-spacing form-group datetime-local']], + ['div' => ['class' => 'custom-spacing datetime-local']], ['label' => ['class' => 'form-label', 'for' => 'created']], 'Created', '/label', @@ -289,7 +289,7 @@ public function testDefaultAlignDateTimeControlWithError() $expected = [ ['div' => [ - 'class' => 'mb-3 form-group datetime-local is-invalid', + 'class' => 'mb-3 datetime-local is-invalid', ]], ['label' => ['class' => 'form-label', 'for' => 'created']], 'Created', @@ -329,7 +329,7 @@ public function testDefaultAlignDateTimeControlWithErrorAndHelp() $expected = [ ['div' => [ - 'class' => 'mb-3 form-group datetime-local is-invalid', + 'class' => 'mb-3 datetime-local is-invalid', ]], ['label' => ['class' => 'form-label', 'for' => 'created']], 'Created', @@ -376,7 +376,7 @@ public function testDefaultAlignDateTimeControlWithErrorAndHelpOptions() $expected = [ ['div' => [ - 'class' => 'mb-3 form-group datetime-local is-invalid', + 'class' => 'mb-3 datetime-local is-invalid', ]], ['label' => ['class' => 'form-label', 'for' => 'created']], 'Created', @@ -423,7 +423,7 @@ public function testDefaultAlignDateTimeControlContainerOptions() $expected = [ ['div' => [ 'attribute' => 'container-attribute', - 'class' => 'container-class mb-3 form-group datetime-local', + 'class' => 'container-class mb-3 datetime-local', ]], ['label' => ['class' => 'form-label', 'for' => 'created']], 'Created', @@ -461,7 +461,7 @@ public function testDefaultAlignDateTimeControlContainerOptionsWithError() $expected = [ ['div' => [ 'attribute' => 'container-attribute', - 'class' => 'container-class mb-3 form-group datetime-local is-invalid', + 'class' => 'container-class mb-3 datetime-local is-invalid', ]], ['label' => ['class' => 'form-label', 'for' => 'created']], 'Created', @@ -495,7 +495,7 @@ public function testDefaultAlignDateTimeControlDate() 'value' => $now, ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group date']], + ['div' => ['class' => 'mb-3 date']], ['label' => ['class' => 'form-label', 'for' => 'created']], 'Created', '/label', @@ -522,7 +522,7 @@ public function testDefaultAlignDateTimeControlTime() 'value' => $now, ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group time']], + ['div' => ['class' => 'mb-3 time']], ['label' => ['class' => 'form-label', 'for' => 'created']], 'Created', '/label', @@ -546,17 +546,17 @@ public function testDefaultAlignDateTimeControlCustomContainerTemplateViaTemplat $result = $this->Form->control('created', [ 'type' => 'datetime', ]); - $this->assertStringContainsString('
', $result); + $this->assertStringContainsString('
', $result); $result = $this->Form->control('created', [ 'type' => 'date', ]); - $this->assertStringContainsString('
', $result); + $this->assertStringContainsString('
', $result); $result = $this->Form->control('created', [ 'type' => 'time', ]); - $this->assertStringContainsString('
', $result); + $this->assertStringContainsString('
', $result); $this->Form->setTemplates([ 'datetimeContainer' => '
{{content}}
', @@ -591,17 +591,17 @@ public function testDefaultAlignDateTimeControlCustomContainerErrorTemplateViaOp $result = $this->Form->control('created', [ 'type' => 'datetime', ]); - $this->assertStringContainsString('
', $result); + $this->assertStringContainsString('
', $result); $result = $this->Form->control('created', [ 'type' => 'date', ]); - $this->assertStringContainsString('
', $result); + $this->assertStringContainsString('
', $result); $result = $this->Form->control('created', [ 'type' => 'time', ]); - $this->assertStringContainsString('
', $result); + $this->assertStringContainsString('
', $result); $result = $this->Form->control('created', [ 'type' => 'datetime', diff --git a/tests/TestCase/View/Helper/FormHelper/DefaultAlign/FileControlTest.php b/tests/TestCase/View/Helper/FormHelper/DefaultAlign/FileControlTest.php index e03fe8e4..b2787a69 100644 --- a/tests/TestCase/View/Helper/FormHelper/DefaultAlign/FileControlTest.php +++ b/tests/TestCase/View/Helper/FormHelper/DefaultAlign/FileControlTest.php @@ -15,7 +15,7 @@ public function testDefaultAlignFileControl() 'type' => 'file', ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group file']], + ['div' => ['class' => 'mb-3 file']], ['label' => ['class' => 'form-label', 'for' => 'file']], 'File', '/label', @@ -39,7 +39,7 @@ public function testDefaultAlignFileControlWithDisabledLabel() 'label' => false, ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group file']], + ['div' => ['class' => 'mb-3 file']], ['input' => [ 'type' => 'file', 'name' => 'file', @@ -60,7 +60,7 @@ public function testDefaultAlignFileControlWithCustomLabel() 'label' => 'Custom Label', ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group file']], + ['div' => ['class' => 'mb-3 file']], ['label' => ['class' => 'form-label', 'for' => 'file']], 'Custom Label', '/label', @@ -88,7 +88,7 @@ public function testDefaultAlignFileControlWithCustomLabelOptions() ], ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group file']], + ['div' => ['class' => 'mb-3 file']], ['label' => [ 'class' => 'custom-label-class form-label', 'foo' => 'bar', @@ -116,7 +116,7 @@ public function testDefaultAlignFileControlWithHelp() 'help' => 'Help text', ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group file']], + ['div' => ['class' => 'mb-3 file']], ['label' => ['class' => 'form-label', 'for' => 'file']], 'File', '/label', @@ -149,7 +149,7 @@ public function testDefaultAlignFileControlWithHelpOptions() ], ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group file']], + ['div' => ['class' => 'mb-3 file']], ['label' => ['class' => 'form-label', 'for' => 'file']], 'File', '/label', @@ -181,7 +181,7 @@ public function testDefaultAlignFileControlWithTooltip() 'tooltip' => 'Tooltip text', ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group file']], + ['div' => ['class' => 'mb-3 file']], ['label' => ['class' => 'form-label', 'for' => 'file']], 'File ', 'span' => [ @@ -211,7 +211,7 @@ public function testDefaultAlignFileControlWithCustomSpacing() 'spacing' => 'custom-spacing', ]); $expected = [ - ['div' => ['class' => 'custom-spacing form-group file']], + ['div' => ['class' => 'custom-spacing file']], ['label' => ['class' => 'form-label', 'for' => 'file']], 'File', '/label', @@ -237,7 +237,7 @@ public function testDefaultAlignFileControlWithError() 'type' => 'file', ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group file is-invalid']], + ['div' => ['class' => 'mb-3 file is-invalid']], ['label' => ['class' => 'form-label', 'for' => 'file']], 'File', '/label', @@ -269,7 +269,7 @@ public function testDefaultAlignFileControlWithErrorAndHelp() 'help' => 'Help text', ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group file is-invalid']], + ['div' => ['class' => 'mb-3 file is-invalid']], ['label' => ['class' => 'form-label', 'for' => 'file']], 'File', '/label', @@ -309,7 +309,7 @@ public function testDefaultAlignFileControlWithErrorAndHelpOptions() ], ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group file is-invalid']], + ['div' => ['class' => 'mb-3 file is-invalid']], ['label' => ['class' => 'form-label', 'for' => 'file']], 'File', '/label', @@ -350,7 +350,7 @@ public function testDefaultAlignFileControlContainerOptions() $expected = [ ['div' => [ 'attribute' => 'container-attribute', - 'class' => 'container-class mb-3 form-group file', + 'class' => 'container-class mb-3 file', ]], ['label' => ['class' => 'form-label', 'for' => 'file']], 'File', @@ -383,7 +383,7 @@ public function testDefaultAlignFileControlContainerOptionsWithError() $expected = [ ['div' => [ 'attribute' => 'container-attribute', - 'class' => 'container-class mb-3 form-group file is-invalid', + 'class' => 'container-class mb-3 file is-invalid', ]], ['label' => ['class' => 'form-label', 'for' => 'file']], 'File', @@ -413,7 +413,7 @@ public function testDefaultAlignFileControlInputGroupAppend() 'append' => 'append', ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group file']], + ['div' => ['class' => 'mb-3 file']], ['label' => ['class' => 'form-label', 'for' => 'file']], 'File', '/label', @@ -442,7 +442,7 @@ public function testDefaultAlignFileControlInputGroupPrepend() 'prepend' => 'prepend', ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group file']], + ['div' => ['class' => 'mb-3 file']], ['label' => ['class' => 'form-label', 'for' => 'file']], 'File', '/label', @@ -474,7 +474,7 @@ public function testDefaultAlignFileControlInputGroupWithError() 'append' => 'append', ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group file is-invalid']], + ['div' => ['class' => 'mb-3 file is-invalid']], ['label' => ['class' => 'form-label', 'for' => 'file']], 'File', '/label', diff --git a/tests/TestCase/View/Helper/FormHelper/DefaultAlign/MultipleCheckboxControlTest.php b/tests/TestCase/View/Helper/FormHelper/DefaultAlign/MultipleCheckboxControlTest.php index ee2cadf2..6c37866c 100644 --- a/tests/TestCase/View/Helper/FormHelper/DefaultAlign/MultipleCheckboxControlTest.php +++ b/tests/TestCase/View/Helper/FormHelper/DefaultAlign/MultipleCheckboxControlTest.php @@ -19,7 +19,7 @@ public function testDefaultAlignMultipleCheckboxControl() ], ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group multicheckbox', 'role' => 'group', 'aria-labelledby' => 'users-group-label']], + ['div' => ['class' => 'mb-3 multicheckbox', 'role' => 'group', 'aria-labelledby' => 'users-group-label']], ['label' => ['id' => 'users-group-label', 'class' => 'form-label d-block']], 'Users', '/label', @@ -72,7 +72,7 @@ public function testDefaultAlignMultipleCheckboxControlWithDisabledLabel() ]); $expected = [ ['div' => [ - 'class' => 'mb-3 form-group multicheckbox', + 'class' => 'mb-3 multicheckbox', 'role' => 'group', 'aria-labelledby' => 'users-group-label', ]], @@ -125,7 +125,7 @@ public function testDefaultAlignMultipleCheckboxControlWithCustomLabel() ]); $expected = [ ['div' => [ - 'class' => 'mb-3 form-group multicheckbox', + 'class' => 'mb-3 multicheckbox', 'role' => 'group', 'aria-labelledby' => 'users-group-label', ]], @@ -185,7 +185,7 @@ public function testDefaultAlignMultipleCheckboxControlWithCustomLabelOptions() ]); $expected = [ ['div' => [ - 'class' => 'mb-3 form-group multicheckbox', + 'class' => 'mb-3 multicheckbox', 'role' => 'group', 'aria-labelledby' => 'users-group-label', ]], @@ -240,7 +240,7 @@ public function testDefaultAlignMultipleCheckboxControlWithHelp() 'help' => 'Help text', ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group multicheckbox', 'role' => 'group', 'aria-labelledby' => 'users-group-label']], + ['div' => ['class' => 'mb-3 multicheckbox', 'role' => 'group', 'aria-labelledby' => 'users-group-label']], ['label' => ['id' => 'users-group-label', 'class' => 'form-label d-block']], 'Users', '/label', @@ -302,7 +302,7 @@ public function testDefaultAlignMultipleCheckboxControlWithHelpOptions() ], ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group multicheckbox', 'role' => 'group', 'aria-labelledby' => 'users-group-label']], + ['div' => ['class' => 'mb-3 multicheckbox', 'role' => 'group', 'aria-labelledby' => 'users-group-label']], ['label' => ['id' => 'users-group-label', 'class' => 'form-label d-block']], 'Users', '/label', @@ -360,7 +360,7 @@ public function testDefaultAlignMultipleCheckboxControlWithTooltip() 'tooltip' => 'Tooltip text', ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group multicheckbox', 'role' => 'group', 'aria-labelledby' => 'users-group-label']], + ['div' => ['class' => 'mb-3 multicheckbox', 'role' => 'group', 'aria-labelledby' => 'users-group-label']], ['label' => ['id' => 'users-group-label', 'class' => 'form-label d-block']], 'Users ', 'span' => [ @@ -392,7 +392,7 @@ public function testDefaultAlignMultipleCheckboxControlWithCustomSpacing() ]); $expected = [ ['div' => [ - 'class' => 'custom-spacing form-group multicheckbox', + 'class' => 'custom-spacing multicheckbox', 'role' => 'group', 'aria-labelledby' => 'users-group-label', ]], @@ -426,7 +426,7 @@ public function testDefaultAlignMultipleCheckboxControlWithError() ]); $expected = [ ['div' => [ - 'class' => 'mb-3 form-group multicheckbox is-invalid', + 'class' => 'mb-3 multicheckbox is-invalid', 'role' => 'group', 'aria-labelledby' => 'users-group-label', ]], @@ -493,7 +493,7 @@ public function testDefaultAlignMultipleCheckboxControlWithErrorAndHelp() ]); $expected = [ ['div' => [ - 'class' => 'mb-3 form-group multicheckbox is-invalid', + 'class' => 'mb-3 multicheckbox is-invalid', 'role' => 'group', 'aria-labelledby' => 'users-group-label', ]], @@ -568,7 +568,7 @@ public function testDefaultAlignMultipleCheckboxControlWithErrorAndHelpOptions() ]); $expected = [ ['div' => [ - 'class' => 'mb-3 form-group multicheckbox is-invalid', + 'class' => 'mb-3 multicheckbox is-invalid', 'role' => 'group', 'aria-labelledby' => 'users-group-label', ]], @@ -643,7 +643,7 @@ public function testDefaultAlignMultipleCheckboxControlCustomAriaDescribedByWith ]); $expected = [ ['div' => [ - 'class' => 'mb-3 form-group multicheckbox is-invalid', + 'class' => 'mb-3 multicheckbox is-invalid', 'role' => 'group', 'aria-labelledby' => 'users-group-label', ]], @@ -714,7 +714,7 @@ public function testDefaultAlignMultipleCheckboxControlContainerOptions() $expected = [ ['div' => [ 'attribute' => 'container-attribute', - 'class' => 'container-class mb-3 form-group multicheckbox', + 'class' => 'container-class mb-3 multicheckbox', 'role' => 'group', 'aria-labelledby' => 'users-group-label', ]], @@ -777,7 +777,7 @@ public function testDefaultAlignMultipleCheckboxControlContainerOptionsWithError $expected = [ ['div' => [ 'attribute' => 'container-attribute', - 'class' => 'container-class mb-3 form-group multicheckbox is-invalid', + 'class' => 'container-class mb-3 multicheckbox is-invalid', 'role' => 'group', 'aria-labelledby' => 'users-group-label', ]], @@ -840,7 +840,7 @@ public function testDefaultAlignMultipleCheckboxControlNestedInput() 'nestedInput' => true, ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group multicheckbox', 'role' => 'group', 'aria-labelledby' => 'users-group-label']], + ['div' => ['class' => 'mb-3 multicheckbox', 'role' => 'group', 'aria-labelledby' => 'users-group-label']], ['label' => ['id' => 'users-group-label', 'class' => 'form-label d-block']], 'Users', '/label', @@ -896,7 +896,7 @@ public function testDefaultAlignMultipleCheckboxControlNestedInputWithError() ]); $expected = [ ['div' => [ - 'class' => 'mb-3 form-group multicheckbox is-invalid', + 'class' => 'mb-3 multicheckbox is-invalid', 'role' => 'group', 'aria-labelledby' => 'users-group-label', ]], @@ -959,7 +959,7 @@ public function testDefaultAlignMultipleCheckboxControlInline() 'inline' => true, ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group multicheckbox', 'role' => 'group', 'aria-labelledby' => 'users-group-label']], + ['div' => ['class' => 'mb-3 multicheckbox', 'role' => 'group', 'aria-labelledby' => 'users-group-label']], ['label' => ['id' => 'users-group-label', 'class' => 'form-label d-block']], 'Users', '/label', @@ -1012,7 +1012,7 @@ public function testDefaultAlignMultipleCheckboxControlInlineWithDisabledLabel() 'label' => false, ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group multicheckbox', 'role' => 'group', 'aria-labelledby' => 'users-group-label']], + ['div' => ['class' => 'mb-3 multicheckbox', 'role' => 'group', 'aria-labelledby' => 'users-group-label']], ['input' => [ 'type' => 'hidden', 'id' => 'users', @@ -1062,7 +1062,7 @@ public function testDefaultAlignMultipleCheckboxControlInlineWithCustomLabel() 'label' => 'Custom Label', ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group multicheckbox', 'role' => 'group', 'aria-labelledby' => 'users-group-label']], + ['div' => ['class' => 'mb-3 multicheckbox', 'role' => 'group', 'aria-labelledby' => 'users-group-label']], ['label' => ['id' => 'users-group-label', 'class' => 'form-label d-block']], 'Custom Label', '/label', @@ -1119,7 +1119,7 @@ public function testDefaultAlignMultipleCheckboxControlInlineWithCustomLabelOpti ], ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group multicheckbox', 'role' => 'group', 'aria-labelledby' => 'users-group-label']], + ['div' => ['class' => 'mb-3 multicheckbox', 'role' => 'group', 'aria-labelledby' => 'users-group-label']], ['label' => ['id' => 'users-group-label', 'class' => 'custom-label-class form-label d-block', 'foo' => 'bar']], 'Custom Label', '/label', @@ -1173,7 +1173,7 @@ public function testDefaultAlignMultipleCheckboxControlInlineWithHelp() ]); $expected = [ ['div' => [ - 'class' => 'mb-3 form-group multicheckbox', + 'class' => 'mb-3 multicheckbox', 'role' => 'group', 'aria-labelledby' => 'users-group-label', ]], @@ -1240,7 +1240,7 @@ public function testDefaultAlignMultipleCheckboxControlInlineWithHelpOptions() ]); $expected = [ ['div' => [ - 'class' => 'mb-3 form-group multicheckbox', + 'class' => 'mb-3 multicheckbox', 'role' => 'group', 'aria-labelledby' => 'users-group-label', ]], @@ -1303,7 +1303,7 @@ public function testDefaultAlignMultipleCheckboxControlInlineWithTooltip() ]); $expected = [ ['div' => [ - 'class' => 'mb-3 form-group multicheckbox', + 'class' => 'mb-3 multicheckbox', 'role' => 'group', 'aria-labelledby' => 'users-group-label', ]], @@ -1344,7 +1344,7 @@ public function testDefaultAlignMultipleCheckboxControlInlineWithError() ]); $expected = [ ['div' => [ - 'class' => 'mb-3 form-group multicheckbox is-invalid', + 'class' => 'mb-3 multicheckbox is-invalid', 'role' => 'group', 'aria-labelledby' => 'users-group-label', ]], @@ -1413,7 +1413,7 @@ public function testDefaultAlignMultipleCheckboxControlInlineContainerOptions() $expected = [ ['div' => [ 'attribute' => 'container-attribute', - 'class' => 'container-class mb-3 form-group multicheckbox', + 'class' => 'container-class mb-3 multicheckbox', 'role' => 'group', 'aria-labelledby' => 'users-group-label', ]], @@ -1477,7 +1477,7 @@ public function testDefaultAlignMultipleCheckboxControlInlineContainerOptionsWit $expected = [ ['div' => [ 'attribute' => 'container-attribute', - 'class' => 'container-class mb-3 form-group multicheckbox is-invalid', + 'class' => 'container-class mb-3 multicheckbox is-invalid', 'role' => 'group', 'aria-labelledby' => 'users-group-label', ]], @@ -1541,7 +1541,7 @@ public function testDefaultAlignMultipleCheckboxControlInlineNestedInput() 'nestedInput' => true, ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group multicheckbox', 'role' => 'group', 'aria-labelledby' => 'users-group-label']], + ['div' => ['class' => 'mb-3 multicheckbox', 'role' => 'group', 'aria-labelledby' => 'users-group-label']], ['label' => ['id' => 'users-group-label', 'class' => 'form-label d-block']], 'Users', '/label', @@ -1598,7 +1598,7 @@ public function testDefaultAlignMultipleCheckboxControlOptionGroups() ], ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group multicheckbox', 'role' => 'group', 'aria-labelledby' => 'users-group-label']], + ['div' => ['class' => 'mb-3 multicheckbox', 'role' => 'group', 'aria-labelledby' => 'users-group-label']], ['label' => ['id' => 'users-group-label', 'class' => 'form-label d-block']], 'Users', '/label', @@ -1608,7 +1608,7 @@ public function testDefaultAlignMultipleCheckboxControlOptionGroups() 'name' => 'users', 'value' => '', ]], - ['fieldset' => ['class' => 'mb-3 form-group']], + ['fieldset' => ['class' => 'mb-3']], ['legend' => ['class' => 'col-form-label pt-0']], 'group 1', '/legend', @@ -1637,7 +1637,7 @@ public function testDefaultAlignMultipleCheckboxControlOptionGroups() '/label', '/div', '/fieldset', - ['fieldset' => ['class' => 'mb-3 form-group']], + ['fieldset' => ['class' => 'mb-3']], ['legend' => ['class' => 'col-form-label pt-0']], 'group 2', '/legend', @@ -1689,7 +1689,7 @@ public function testDefaultAlignMultipleCheckboxControlOptionGroupsWithCustomSpa ]); $expected = [ ['div' => [ - 'class' => 'custom-spacing form-group multicheckbox', + 'class' => 'custom-spacing multicheckbox', 'role' => 'group', 'aria-labelledby' => 'users-group-label', ]], @@ -1702,7 +1702,7 @@ public function testDefaultAlignMultipleCheckboxControlOptionGroupsWithCustomSpa 'name' => 'users', 'value' => '', ]], - ['fieldset' => ['class' => 'custom-spacing form-group']], + ['fieldset' => ['class' => 'custom-spacing']], ['legend' => ['class' => 'col-form-label pt-0']], 'group 1', '/legend', @@ -1731,7 +1731,7 @@ public function testDefaultAlignMultipleCheckboxControlOptionGroupsWithCustomSpa '/label', '/div', '/fieldset', - ['fieldset' => ['class' => 'custom-spacing form-group']], + ['fieldset' => ['class' => 'custom-spacing']], ['legend' => ['class' => 'col-form-label pt-0']], 'group 2', '/legend', @@ -1787,7 +1787,7 @@ public function testDefaultAlignMultipleCheckboxControlOptionGroupsWithError() ]); $expected = [ ['div' => [ - 'class' => 'mb-3 form-group multicheckbox is-invalid', + 'class' => 'mb-3 multicheckbox is-invalid', 'role' => 'group', 'aria-labelledby' => 'users-group-label', ]], @@ -1801,7 +1801,7 @@ public function testDefaultAlignMultipleCheckboxControlOptionGroupsWithError() 'name' => 'users', 'value' => '', ]], - ['fieldset' => ['class' => 'mb-3 form-group']], + ['fieldset' => ['class' => 'mb-3']], ['legend' => ['class' => 'col-form-label pt-0']], 'group 1', '/legend', @@ -1834,7 +1834,7 @@ public function testDefaultAlignMultipleCheckboxControlOptionGroupsWithError() '/label', '/div', '/fieldset', - ['fieldset' => ['class' => 'mb-3 form-group']], + ['fieldset' => ['class' => 'mb-3']], ['legend' => ['class' => 'col-form-label pt-0']], 'group 2', '/legend', @@ -1894,7 +1894,7 @@ public function testDefaultAlignMultipleCheckboxControlOptionGroupsNestedInput() 'nestedInput' => true, ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group multicheckbox', 'role' => 'group', 'aria-labelledby' => 'users-group-label']], + ['div' => ['class' => 'mb-3 multicheckbox', 'role' => 'group', 'aria-labelledby' => 'users-group-label']], ['label' => ['id' => 'users-group-label', 'class' => 'form-label d-block']], 'Users', '/label', @@ -1904,7 +1904,7 @@ public function testDefaultAlignMultipleCheckboxControlOptionGroupsNestedInput() 'name' => 'users', 'value' => '', ]], - ['fieldset' => ['class' => 'mb-3 form-group']], + ['fieldset' => ['class' => 'mb-3']], ['legend' => ['class' => 'col-form-label pt-0']], 'group 1', '/legend', @@ -1933,7 +1933,7 @@ public function testDefaultAlignMultipleCheckboxControlOptionGroupsNestedInput() '/label', '/div', '/fieldset', - ['fieldset' => ['class' => 'mb-3 form-group']], + ['fieldset' => ['class' => 'mb-3']], ['legend' => ['class' => 'col-form-label pt-0']], 'group 2', '/legend', @@ -1986,7 +1986,7 @@ public function testDefaultAlignMultipleCheckboxControlOptionGroupsInline() 'inline' => true, ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group multicheckbox', 'role' => 'group', 'aria-labelledby' => 'users-group-label']], + ['div' => ['class' => 'mb-3 multicheckbox', 'role' => 'group', 'aria-labelledby' => 'users-group-label']], ['label' => ['id' => 'users-group-label', 'class' => 'form-label d-block']], 'Users', '/label', @@ -1996,7 +1996,7 @@ public function testDefaultAlignMultipleCheckboxControlOptionGroupsInline() 'name' => 'users', 'value' => '', ]], - ['fieldset' => ['class' => 'mb-3 form-group']], + ['fieldset' => ['class' => 'mb-3']], ['legend' => ['class' => 'col-form-label pt-0']], 'group 1', '/legend', @@ -2025,7 +2025,7 @@ public function testDefaultAlignMultipleCheckboxControlOptionGroupsInline() '/label', '/div', '/fieldset', - ['fieldset' => ['class' => 'mb-3 form-group']], + ['fieldset' => ['class' => 'mb-3']], ['legend' => ['class' => 'col-form-label pt-0']], 'group 2', '/legend', @@ -2079,7 +2079,7 @@ public function testDefaultAlignMultipleCheckboxControlOptionGroupsInlineNestedI 'nestedInput' => true, ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group multicheckbox', 'role' => 'group', 'aria-labelledby' => 'users-group-label']], + ['div' => ['class' => 'mb-3 multicheckbox', 'role' => 'group', 'aria-labelledby' => 'users-group-label']], ['label' => ['id' => 'users-group-label', 'class' => 'form-label d-block']], 'Users', '/label', @@ -2089,7 +2089,7 @@ public function testDefaultAlignMultipleCheckboxControlOptionGroupsInlineNestedI 'name' => 'users', 'value' => '', ]], - ['fieldset' => ['class' => 'mb-3 form-group']], + ['fieldset' => ['class' => 'mb-3']], ['legend' => ['class' => 'col-form-label pt-0']], 'group 1', '/legend', @@ -2118,7 +2118,7 @@ public function testDefaultAlignMultipleCheckboxControlOptionGroupsInlineNestedI '/label', '/div', '/fieldset', - ['fieldset' => ['class' => 'mb-3 form-group']], + ['fieldset' => ['class' => 'mb-3']], ['legend' => ['class' => 'col-form-label pt-0']], 'group 2', '/legend', @@ -2168,7 +2168,7 @@ public function testDefaultAlignMultipleCheckboxControlOptionsGroupsAndSingleEnt ], ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group multicheckbox', 'role' => 'group', 'aria-labelledby' => 'users-group-label']], + ['div' => ['class' => 'mb-3 multicheckbox', 'role' => 'group', 'aria-labelledby' => 'users-group-label']], ['label' => ['id' => 'users-group-label', 'class' => 'form-label d-block']], 'Users', '/label', @@ -2202,7 +2202,7 @@ public function testDefaultAlignMultipleCheckboxControlOptionsGroupsAndSingleEnt 'option 2', '/label', '/div', - ['fieldset' => ['class' => 'mb-3 form-group']], + ['fieldset' => ['class' => 'mb-3']], ['legend' => ['class' => 'col-form-label pt-0']], 'group', '/legend', @@ -2276,7 +2276,7 @@ public function testDefaultAlignMultipleCheckboxControlOptionsGroupsAndSingleEnt ], ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group multicheckbox', 'role' => 'group', 'aria-labelledby' => 'users-group-label']], + ['div' => ['class' => 'mb-3 multicheckbox', 'role' => 'group', 'aria-labelledby' => 'users-group-label']], ['label' => ['id' => 'users-group-label', 'class' => 'form-label d-block']], 'Users', '/label', @@ -2322,7 +2322,7 @@ public function testDefaultAlignMultipleCheckboxControlOptionsGroupsAndSingleEnt 'option 3', '/label', '/div', - ['fieldset' => ['class' => 'mb-3 form-group']], + ['fieldset' => ['class' => 'mb-3']], ['legend' => ['class' => 'col-form-label pt-0']], 'group', '/legend', @@ -2394,7 +2394,7 @@ public function testDefaultAlignMultipleCheckboxControlOptionsGroupsAndSingleEnt 'nestedInput' => true, ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group multicheckbox', 'role' => 'group', 'aria-labelledby' => 'users-group-label']], + ['div' => ['class' => 'mb-3 multicheckbox', 'role' => 'group', 'aria-labelledby' => 'users-group-label']], ['label' => ['id' => 'users-group-label', 'class' => 'form-label d-block']], 'Users', '/label', @@ -2428,7 +2428,7 @@ public function testDefaultAlignMultipleCheckboxControlOptionsGroupsAndSingleEnt 'option 2', '/label', '/div', - ['fieldset' => ['class' => 'mb-3 form-group']], + ['fieldset' => ['class' => 'mb-3']], ['legend' => ['class' => 'col-form-label pt-0']], 'group', '/legend', @@ -2503,7 +2503,7 @@ public function testDefaultAlignMultipleCheckboxControlOptionsGroupsAndSingleEnt 'nestedInput' => true, ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group multicheckbox', 'role' => 'group', 'aria-labelledby' => 'users-group-label']], + ['div' => ['class' => 'mb-3 multicheckbox', 'role' => 'group', 'aria-labelledby' => 'users-group-label']], ['label' => ['id' => 'users-group-label', 'class' => 'form-label d-block']], 'Users', '/label', @@ -2549,7 +2549,7 @@ public function testDefaultAlignMultipleCheckboxControlOptionsGroupsAndSingleEnt 'option 3', '/label', '/div', - ['fieldset' => ['class' => 'mb-3 form-group']], + ['fieldset' => ['class' => 'mb-3']], ['legend' => ['class' => 'col-form-label pt-0']], 'group', '/legend', @@ -2617,7 +2617,7 @@ public function testDefaultAlignMultipleCheckboxControlSwitch() ], ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group multicheckbox', 'role' => 'group', 'aria-labelledby' => 'users-group-label']], + ['div' => ['class' => 'mb-3 multicheckbox', 'role' => 'group', 'aria-labelledby' => 'users-group-label']], ['label' => ['id' => 'users-group-label', 'class' => 'form-label d-block']], 'Users', '/label', diff --git a/tests/TestCase/View/Helper/FormHelper/DefaultAlign/RadioControlTest.php b/tests/TestCase/View/Helper/FormHelper/DefaultAlign/RadioControlTest.php index 9815ebb4..d3c19cb4 100644 --- a/tests/TestCase/View/Helper/FormHelper/DefaultAlign/RadioControlTest.php +++ b/tests/TestCase/View/Helper/FormHelper/DefaultAlign/RadioControlTest.php @@ -19,7 +19,7 @@ public function testDefaultAlignRadioControl() ], ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group radio', 'role' => 'group', 'aria-labelledby' => 'users-group-label']], + ['div' => ['class' => 'mb-3 radio', 'role' => 'group', 'aria-labelledby' => 'users-group-label']], ['label' => ['id' => 'users-group-label', 'class' => 'form-label d-block']], 'Users', '/label', @@ -71,7 +71,7 @@ public function testDefaultAlignRadioControlWithDisabledLabel() 'label' => false, ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group radio', 'role' => 'group', 'aria-labelledby' => 'users-group-label']], + ['div' => ['class' => 'mb-3 radio', 'role' => 'group', 'aria-labelledby' => 'users-group-label']], ['input' => [ 'type' => 'hidden', 'id' => 'users', @@ -120,7 +120,7 @@ public function testDefaultAlignRadioControlWithCustomLabel() 'label' => 'Custom Label', ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group radio', 'role' => 'group', 'aria-labelledby' => 'users-group-label']], + ['div' => ['class' => 'mb-3 radio', 'role' => 'group', 'aria-labelledby' => 'users-group-label']], ['label' => ['id' => 'users-group-label', 'class' => 'form-label d-block']], 'Custom Label', '/label', @@ -176,7 +176,7 @@ public function testDefaultAlignRadioControlWithCustomLabelOptions() ], ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group radio', 'role' => 'group', 'aria-labelledby' => 'users-group-label']], + ['div' => ['class' => 'mb-3 radio', 'role' => 'group', 'aria-labelledby' => 'users-group-label']], ['label' => ['id' => 'users-group-label', 'class' => 'custom-label-class form-label d-block', 'foo' => 'bar']], 'Custom Label', '/label', @@ -228,7 +228,7 @@ public function testDefaultAlignRadioControlWithHelp() 'help' => 'Help text', ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group radio', 'role' => 'group', 'aria-labelledby' => 'users-group-label']], + ['div' => ['class' => 'mb-3 radio', 'role' => 'group', 'aria-labelledby' => 'users-group-label']], ['label' => ['id' => 'users-group-label', 'class' => 'form-label d-block']], 'Users', '/label', @@ -290,7 +290,7 @@ public function testDefaultAlignRadioControlWithHelpOptions() ], ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group radio', 'role' => 'group', 'aria-labelledby' => 'users-group-label']], + ['div' => ['class' => 'mb-3 radio', 'role' => 'group', 'aria-labelledby' => 'users-group-label']], ['label' => ['id' => 'users-group-label', 'class' => 'form-label d-block']], 'Users', '/label', @@ -347,7 +347,7 @@ public function testDefaultAlignRadioControlWithTooltip() 'tooltip' => 'Tooltip text', ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group radio', 'role' => 'group', 'aria-labelledby' => 'users-group-label']], + ['div' => ['class' => 'mb-3 radio', 'role' => 'group', 'aria-labelledby' => 'users-group-label']], ['label' => ['id' => 'users-group-label', 'class' => 'form-label d-block']], 'Users' , 'span' => [ @@ -379,7 +379,7 @@ public function testDefaultAlignRadioControlWithCustomSpacing() ]); $expected = [ ['div' => [ - 'class' => 'custom-spacing form-group radio', + 'class' => 'custom-spacing radio', 'role' => 'group', 'aria-labelledby' => 'users-group-label', ]], @@ -413,7 +413,7 @@ public function testDefaultAlignRadioControlWithError() ]); $expected = [ ['div' => [ - 'class' => 'mb-3 form-group radio is-invalid', + 'class' => 'mb-3 radio is-invalid', 'role' => 'group', 'aria-labelledby' => 'users-group-label', ]], @@ -482,7 +482,7 @@ public function testDefaultAlignRadioControlWithErrorAndHelp() ]); $expected = [ ['div' => [ - 'class' => 'mb-3 form-group radio is-invalid', + 'class' => 'mb-3 radio is-invalid', 'role' => 'group', 'aria-labelledby' => 'users-group-label', ]], @@ -557,7 +557,7 @@ public function testDefaultAlignRadioControlWithErrorAndHelpOptions() ]); $expected = [ ['div' => [ - 'class' => 'mb-3 form-group radio is-invalid', + 'class' => 'mb-3 radio is-invalid', 'role' => 'group', 'aria-labelledby' => 'users-group-label', ]], @@ -632,7 +632,7 @@ public function testDefaultAlignRadioControlContainerOptions() $expected = [ ['div' => [ 'attribute' => 'container-attribute', - 'class' => 'container-class mb-3 form-group radio', + 'class' => 'container-class mb-3 radio', 'role' => 'group', 'aria-labelledby' => 'users-group-label', ]], @@ -695,7 +695,7 @@ public function testDefaultAlignRadioControlContainerOptionsWithError() $expected = [ ['div' => [ 'attribute' => 'container-attribute', - 'class' => 'container-class mb-3 form-group radio is-invalid', + 'class' => 'container-class mb-3 radio is-invalid', 'role' => 'group', 'aria-labelledby' => 'users-group-label', ]], @@ -760,7 +760,7 @@ public function testDefaultAlignRadioControlNestedInput() 'nestedInput' => true, ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group radio', 'role' => 'group', 'aria-labelledby' => 'users-group-label']], + ['div' => ['class' => 'mb-3 radio', 'role' => 'group', 'aria-labelledby' => 'users-group-label']], ['label' => ['id' => 'users-group-label', 'class' => 'form-label d-block']], 'Users', '/label', @@ -812,7 +812,7 @@ public function testDefaultAlignRadioControlInline() 'inline' => true, ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group radio', 'role' => 'group', 'aria-labelledby' => 'users-group-label']], + ['div' => ['class' => 'mb-3 radio', 'role' => 'group', 'aria-labelledby' => 'users-group-label']], ['label' => ['id' => 'users-group-label', 'class' => 'form-label d-block']], 'Users', '/label', @@ -865,7 +865,7 @@ public function testDefaultAlignRadioControlInlineWithDisabledLabel() 'label' => false, ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group radio', 'role' => 'group', 'aria-labelledby' => 'users-group-label']], + ['div' => ['class' => 'mb-3 radio', 'role' => 'group', 'aria-labelledby' => 'users-group-label']], ['input' => [ 'type' => 'hidden', 'id' => 'users', @@ -915,7 +915,7 @@ public function testDefaultAlignRadioControlInlineWithCustomLabel() 'label' => 'Custom Label', ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group radio', 'role' => 'group', 'aria-labelledby' => 'users-group-label']], + ['div' => ['class' => 'mb-3 radio', 'role' => 'group', 'aria-labelledby' => 'users-group-label']], ['label' => ['id' => 'users-group-label', 'class' => 'form-label d-block']], 'Custom Label', '/label', @@ -972,7 +972,7 @@ public function testDefaultAlignRadioControlInlineWithCustomLabelOptions() ], ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group radio', 'role' => 'group', 'aria-labelledby' => 'users-group-label']], + ['div' => ['class' => 'mb-3 radio', 'role' => 'group', 'aria-labelledby' => 'users-group-label']], ['label' => [ 'id' => 'users-group-label', 'class' => 'custom-label-class form-label d-block', @@ -1029,7 +1029,7 @@ public function testDefaultAlignRadioControlInlineWithHelp() 'help' => 'Help text', ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group radio', 'role' => 'group', 'aria-labelledby' => 'users-group-label']], + ['div' => ['class' => 'mb-3 radio', 'role' => 'group', 'aria-labelledby' => 'users-group-label']], ['label' => ['id' => 'users-group-label', 'class' => 'form-label d-block']], 'Users', '/label', @@ -1092,7 +1092,7 @@ public function testDefaultAlignRadioControlInlineWithHelpOptions() ], ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group radio', 'role' => 'group', 'aria-labelledby' => 'users-group-label']], + ['div' => ['class' => 'mb-3 radio', 'role' => 'group', 'aria-labelledby' => 'users-group-label']], ['label' => ['id' => 'users-group-label', 'class' => 'form-label d-block']], 'Users', '/label', @@ -1150,7 +1150,7 @@ public function testDefaultAlignRadioControlInlineWithTooltip() 'tooltip' => 'Tooltip text', ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group radio', 'role' => 'group', 'aria-labelledby' => 'users-group-label']], + ['div' => ['class' => 'mb-3 radio', 'role' => 'group', 'aria-labelledby' => 'users-group-label']], ['label' => ['id' => 'users-group-label', 'class' => 'form-label d-block']], 'Users' , 'span' => [ @@ -1188,7 +1188,7 @@ public function testDefaultAlignRadioControlInlineWithError() ]); $expected = [ ['div' => [ - 'class' => 'mb-3 form-group radio is-invalid', + 'class' => 'mb-3 radio is-invalid', 'role' => 'group', 'aria-labelledby' => 'users-group-label', ]], @@ -1259,7 +1259,7 @@ public function testDefaultAlignRadioControlInlineContainerOptions() $expected = [ ['div' => [ 'attribute' => 'container-attribute', - 'class' => 'container-class mb-3 form-group radio', + 'class' => 'container-class mb-3 radio', 'role' => 'group', 'aria-labelledby' => 'users-group-label', ]], @@ -1323,7 +1323,7 @@ public function testDefaultAlignRadioControlInlineContainerOptionsWithError() $expected = [ ['div' => [ 'attribute' => 'container-attribute', - 'class' => 'container-class mb-3 form-group radio is-invalid', + 'class' => 'container-class mb-3 radio is-invalid', 'role' => 'group', 'aria-labelledby' => 'users-group-label', ]], @@ -1389,7 +1389,7 @@ public function testDefaultAlignRadioControlInlineNestedInput() 'nestedInput' => true, ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group radio', 'role' => 'group', 'aria-labelledby' => 'users-group-label']], + ['div' => ['class' => 'mb-3 radio', 'role' => 'group', 'aria-labelledby' => 'users-group-label']], ['label' => ['id' => 'users-group-label', 'class' => 'form-label d-block']], 'Users', '/label', @@ -1446,7 +1446,7 @@ public function testDefaultAlignRadioControlInlineNestedInputWithError() ]); $expected = [ ['div' => [ - 'class' => 'mb-3 form-group radio is-invalid', + 'class' => 'mb-3 radio is-invalid', 'role' => 'group', 'aria-labelledby' => 'users-group-label', ]], @@ -1518,7 +1518,7 @@ public function testPerOptionConfiguration() ], ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group radio', 'role' => 'group', 'aria-labelledby' => 'users-group-label']], + ['div' => ['class' => 'mb-3 radio', 'role' => 'group', 'aria-labelledby' => 'users-group-label']], ['label' => ['id' => 'users-group-label', 'class' => 'form-label d-block']], 'Users', '/label', @@ -1590,7 +1590,7 @@ public function testPerOptionConfigurationInline() 'inline' => true, ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group radio', 'role' => 'group', 'aria-labelledby' => 'users-group-label']], + ['div' => ['class' => 'mb-3 radio', 'role' => 'group', 'aria-labelledby' => 'users-group-label']], ['label' => ['id' => 'users-group-label', 'class' => 'form-label d-block']], 'Users', '/label', @@ -1663,7 +1663,7 @@ public function testPerOptionConfigurationInlineNestedInput() 'nestedInput' => true, ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group radio', 'role' => 'group', 'aria-labelledby' => 'users-group-label']], + ['div' => ['class' => 'mb-3 radio', 'role' => 'group', 'aria-labelledby' => 'users-group-label']], ['label' => ['id' => 'users-group-label', 'class' => 'form-label d-block']], 'Users', '/label', diff --git a/tests/TestCase/View/Helper/FormHelper/DefaultAlign/RangeControlTest.php b/tests/TestCase/View/Helper/FormHelper/DefaultAlign/RangeControlTest.php index f0c2f50e..722fbbb4 100644 --- a/tests/TestCase/View/Helper/FormHelper/DefaultAlign/RangeControlTest.php +++ b/tests/TestCase/View/Helper/FormHelper/DefaultAlign/RangeControlTest.php @@ -18,7 +18,7 @@ public function testDefaultAlignRangeControl() 'step' => 1, ]); $expected = [ - 'div' => ['class' => 'mb-3 form-group range'], + 'div' => ['class' => 'mb-3 range'], ['label' => ['class' => 'form-label', 'for' => 'height']], 'Height', '/label', @@ -48,7 +48,7 @@ public function testDefaultAlignRangeControlWithDisabledLabel() 'label' => false, ]); $expected = [ - 'div' => ['class' => 'mb-3 form-group range'], + 'div' => ['class' => 'mb-3 range'], 'input' => [ 'type' => 'range', 'name' => 'height', @@ -75,7 +75,7 @@ public function testDefaultAlignRangeControlWithCustomLabel() 'label' => 'Custom Label', ]); $expected = [ - 'div' => ['class' => 'mb-3 form-group range'], + 'div' => ['class' => 'mb-3 range'], ['label' => ['class' => 'form-label', 'for' => 'height']], 'Custom Label', '/label', @@ -109,7 +109,7 @@ public function testDefaultAlignRangeControlWithCustomLabelOptions() ], ]); $expected = [ - 'div' => ['class' => 'mb-3 form-group range'], + 'div' => ['class' => 'mb-3 range'], ['label' => ['class' => 'custom-label-class form-label', 'foo' => 'bar', 'for' => 'height']], 'Custom Label', '/label', @@ -139,7 +139,7 @@ public function testDefaultAlignRangeControlWithHelp() 'help' => 'Help text', ]); $expected = [ - 'div' => ['class' => 'mb-3 form-group range'], + 'div' => ['class' => 'mb-3 range'], ['label' => ['class' => 'form-label', 'for' => 'height']], 'Height', '/label', @@ -178,7 +178,7 @@ public function testDefaultAlignRangeControlWithHelpOptions() ], ]); $expected = [ - 'div' => ['class' => 'mb-3 form-group range'], + 'div' => ['class' => 'mb-3 range'], ['label' => ['class' => 'form-label', 'for' => 'height']], 'Height', '/label', @@ -216,7 +216,7 @@ public function testDefaultAlignRangeControlWithTooltip() 'tooltip' => 'Tooltip text', ]); $expected = [ - 'div' => ['class' => 'mb-3 form-group range'], + 'div' => ['class' => 'mb-3 range'], ['label' => ['class' => 'form-label', 'for' => 'height']], 'Height ', 'span' => [ @@ -252,7 +252,7 @@ public function testDefaultAlignRangeControlWithCustomSpacing() 'spacing' => 'custom-spacing', ]); $expected = [ - 'div' => ['class' => 'custom-spacing form-group range'], + 'div' => ['class' => 'custom-spacing range'], ['label' => ['class' => 'form-label', 'for' => 'height']], 'Height', '/label', @@ -284,7 +284,7 @@ public function testDefaultAlignRangeControlWithError() 'step' => 1, ]); $expected = [ - 'div' => ['class' => 'mb-3 form-group range is-invalid'], + 'div' => ['class' => 'mb-3 range is-invalid'], ['label' => ['class' => 'form-label', 'for' => 'height']], 'Height', '/label', @@ -322,7 +322,7 @@ public function testDefaultAlignRangeControlWithErrorAndHelp() 'help' => 'Help text', ]); $expected = [ - 'div' => ['class' => 'mb-3 form-group range is-invalid'], + 'div' => ['class' => 'mb-3 range is-invalid'], ['label' => ['class' => 'form-label', 'for' => 'height']], 'Height', '/label', @@ -368,7 +368,7 @@ public function testDefaultAlignRangeControlWithErrorAndHelpOptions() ], ]); $expected = [ - 'div' => ['class' => 'mb-3 form-group range is-invalid'], + 'div' => ['class' => 'mb-3 range is-invalid'], ['label' => ['class' => 'form-label', 'for' => 'height']], 'Height', '/label', @@ -415,7 +415,7 @@ public function testDefaultAlignRangeControlContainerOptions() $expected = [ 'div' => [ 'attribute' => 'container-attribute', - 'class' => 'container-class mb-3 form-group range', + 'class' => 'container-class mb-3 range', ], ['label' => ['class' => 'form-label', 'for' => 'height']], 'Height', @@ -454,7 +454,7 @@ public function testDefaultAlignRangeControlContainerOptionsWithError() $expected = [ 'div' => [ 'attribute' => 'container-attribute', - 'class' => 'container-class mb-3 form-group range is-invalid', + 'class' => 'container-class mb-3 range is-invalid', ], ['label' => ['class' => 'form-label', 'for' => 'height']], 'Height', diff --git a/tests/TestCase/View/Helper/FormHelper/DefaultAlign/SelectControlTest.php b/tests/TestCase/View/Helper/FormHelper/DefaultAlign/SelectControlTest.php index 6cdcf4ad..146bc6ee 100644 --- a/tests/TestCase/View/Helper/FormHelper/DefaultAlign/SelectControlTest.php +++ b/tests/TestCase/View/Helper/FormHelper/DefaultAlign/SelectControlTest.php @@ -19,7 +19,7 @@ public function testDefaultAlignSelectControl() ], ]); $expected = [ - 'div' => ['class' => 'mb-3 form-group select'], + 'div' => ['class' => 'mb-3 select'], ['label' => ['class' => 'form-label', 'for' => 'users']], 'Users', '/label', @@ -51,7 +51,7 @@ public function testDefaultAlignSelectControlWithFloatingLabel() ], ]); $expected = [ - 'div' => ['class' => 'mb-3 form-floating form-group select'], + 'div' => ['class' => 'mb-3 form-floating select'], ['select' => ['name' => 'users', 'id' => 'users', 'class' => 'form-select']], ['option' => ['value' => '1']], 'option 1', @@ -81,7 +81,7 @@ public function testDefaultAlignSelectControlWithDisabledLabel() 'label' => false, ]); $expected = [ - 'div' => ['class' => 'mb-3 form-group select'], + 'div' => ['class' => 'mb-3 select'], ['select' => ['name' => 'users', 'id' => 'users', 'class' => 'form-select']], ['option' => ['value' => '1']], 'option 1', @@ -108,7 +108,7 @@ public function testDefaultAlignSelectControlWithCustomLabel() 'label' => 'Custom Label', ]); $expected = [ - 'div' => ['class' => 'mb-3 form-group select'], + 'div' => ['class' => 'mb-3 select'], ['label' => ['class' => 'form-label', 'for' => 'users']], 'Custom Label', '/label', @@ -142,7 +142,7 @@ public function testDefaultAlignSelectControlWithCustomLabelOptions() ], ]); $expected = [ - 'div' => ['class' => 'mb-3 form-group select'], + 'div' => ['class' => 'mb-3 select'], 'label' => ['for' => 'users', 'class' => 'custom-label-class form-label', 'foo' => 'bar'], 'Custom Label', '/label', @@ -172,7 +172,7 @@ public function testDefaultAlignSelectControlWithHelp() 'help' => 'Help text', ]); $expected = [ - 'div' => ['class' => 'mb-3 form-group select'], + 'div' => ['class' => 'mb-3 select'], ['label' => ['class' => 'form-label', 'for' => 'users']], 'Users', '/label', @@ -215,7 +215,7 @@ public function testDefaultAlignSelectControlWithHelpOptions() ], ]); $expected = [ - 'div' => ['class' => 'mb-3 form-group select'], + 'div' => ['class' => 'mb-3 select'], ['label' => ['class' => 'form-label', 'for' => 'users']], 'Users', '/label', @@ -257,7 +257,7 @@ public function testDefaultAlignSelectControlWithTooltip() 'tooltip' => 'Tooltip text', ]); $expected = [ - 'div' => ['class' => 'mb-3 form-group select'], + 'div' => ['class' => 'mb-3 select'], ['label' => ['class' => 'form-label', 'for' => 'users']], 'Users', 'span' => [ @@ -293,7 +293,7 @@ public function testDefaultAlignSelectControlWithCustomSpacing() 'spacing' => 'custom-spacing', ]); $expected = [ - 'div' => ['class' => 'custom-spacing form-group select'], + 'div' => ['class' => 'custom-spacing select'], ['label' => ['class' => 'form-label', 'for' => 'users']], 'Users', '/label', @@ -325,7 +325,7 @@ public function testDefaultAlignSelectControlWithError() ], ]); $expected = [ - 'div' => ['class' => 'mb-3 form-group select is-invalid'], + 'div' => ['class' => 'mb-3 select is-invalid'], ['label' => ['class' => 'form-label', 'for' => 'users']], 'Users', '/label', @@ -367,7 +367,7 @@ public function testDefaultAlignSelectControlWithErrorAndHelp() 'help' => 'Help text', ]); $expected = [ - 'div' => ['class' => 'mb-3 form-group select is-invalid'], + 'div' => ['class' => 'mb-3 select is-invalid'], ['label' => ['class' => 'form-label', 'for' => 'users']], 'Users', '/label', @@ -417,7 +417,7 @@ public function testDefaultAlignSelectControlWithErrorAndHelpOptions() ], ]); $expected = [ - 'div' => ['class' => 'mb-3 form-group select is-invalid'], + 'div' => ['class' => 'mb-3 select is-invalid'], ['label' => ['class' => 'form-label', 'for' => 'users']], 'Users', '/label', @@ -468,7 +468,7 @@ public function testDefaultAlignSelectControlContainerOptions() $expected = [ 'div' => [ 'attribute' => 'container-attribute', - 'class' => 'container-class mb-3 form-group select', + 'class' => 'container-class mb-3 select', ], ['label' => ['class' => 'form-label', 'for' => 'users']], 'Users', @@ -507,7 +507,7 @@ public function testDefaultAlignSelectControlContainerOptionsWithError() $expected = [ 'div' => [ 'attribute' => 'container-attribute', - 'class' => 'container-class mb-3 form-group select is-invalid', + 'class' => 'container-class mb-3 select is-invalid', ], ['label' => ['class' => 'form-label', 'for' => 'users']], 'Users', @@ -547,7 +547,7 @@ public function testDefaultAlignSelectControlInputGroupAppend() 'append' => 'append', ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group select']], + ['div' => ['class' => 'mb-3 select']], ['label' => ['class' => 'form-label', 'for' => 'users']], 'Users', '/label', @@ -582,7 +582,7 @@ public function testDefaultAlignSelectControlInputGroupPrepend() 'prepend' => 'prepend', ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group select']], + ['div' => ['class' => 'mb-3 select']], ['label' => ['class' => 'form-label', 'for' => 'users']], 'Users', '/label', diff --git a/tests/TestCase/View/Helper/FormHelper/DefaultAlign/StaticControlTest.php b/tests/TestCase/View/Helper/FormHelper/DefaultAlign/StaticControlTest.php index 6f868996..113c2856 100644 --- a/tests/TestCase/View/Helper/FormHelper/DefaultAlign/StaticControlTest.php +++ b/tests/TestCase/View/Helper/FormHelper/DefaultAlign/StaticControlTest.php @@ -17,7 +17,7 @@ public function testDefaultAlignStaticControl() $result = $this->Form->control('title', ['type' => 'staticControl']); $expected = [ - 'div' => ['class' => 'mb-3 form-group staticControl'], + 'div' => ['class' => 'mb-3 staticControl'], ['label' => ['class' => 'form-label', 'for' => 'title']], 'Title', '/label', @@ -51,7 +51,7 @@ public function testDefaultAlignStaticControlWithoutHiddenField() 'escape' => false, ]); $expected = [ - 'div' => ['class' => 'mb-3 form-group staticControl'], + 'div' => ['class' => 'mb-3 staticControl'], ['label' => ['class' => 'form-label', 'for' => 'title']], 'Title', '/label', @@ -77,7 +77,7 @@ public function testDefaultAlignStaticControlWithDisabledLabel() 'label' => false, ]); $expected = [ - 'div' => ['class' => 'mb-3 form-group staticControl'], + 'div' => ['class' => 'mb-3 staticControl'], 'p' => ['class' => 'form-control-plaintext'], 'title', '/p', @@ -103,7 +103,7 @@ public function testDefaultAlignStaticControlWithCustomLabel() 'label' => 'Custom Label', ]); $expected = [ - 'div' => ['class' => 'mb-3 form-group staticControl'], + 'div' => ['class' => 'mb-3 staticControl'], ['label' => ['class' => 'form-label', 'for' => 'title']], 'Custom Label', '/label', @@ -136,7 +136,7 @@ public function testDefaultAlignStaticControlWithCustomLabelOptions() ], ]); $expected = [ - 'div' => ['class' => 'mb-3 form-group staticControl'], + 'div' => ['class' => 'mb-3 staticControl'], 'label' => ['class' => 'custom-label-class form-label', 'foo' => 'bar', 'for' => 'title'], 'Custom Label', '/label', @@ -165,7 +165,7 @@ public function testDefaultAlignStaticControlWithHelp() 'help' => 'Help text', ]); $expected = [ - 'div' => ['class' => 'mb-3 form-group staticControl'], + 'div' => ['class' => 'mb-3 staticControl'], ['label' => ['class' => 'form-label', 'for' => 'title']], 'Title', '/label', @@ -203,7 +203,7 @@ public function testDefaultAlignStaticControlWithHelpOptions() ], ]); $expected = [ - 'div' => ['class' => 'mb-3 form-group staticControl'], + 'div' => ['class' => 'mb-3 staticControl'], ['label' => ['class' => 'form-label', 'for' => 'title']], 'Title', '/label', @@ -240,7 +240,7 @@ public function testDefaultAlignStaticControlWithTooltip() 'tooltip' => 'Tooltip text', ]); $expected = [ - 'div' => ['class' => 'mb-3 form-group staticControl'], + 'div' => ['class' => 'mb-3 staticControl'], ['label' => ['class' => 'form-label', 'for' => 'title']], 'Title', 'span' => [ @@ -275,7 +275,7 @@ public function testDefaultAlignStaticControlWithCustomSpacing() 'spacing' => 'custom-spacing', ]); $expected = [ - 'div' => ['class' => 'custom-spacing form-group staticControl'], + 'div' => ['class' => 'custom-spacing staticControl'], ['label' => ['class' => 'form-label', 'for' => 'title']], 'Title', '/label', @@ -306,7 +306,7 @@ public function testDefaultAlignStaticControlWithError() 'type' => 'staticControl', ]); $expected = [ - 'div' => ['class' => 'mb-3 form-group staticControl is-invalid'], + 'div' => ['class' => 'mb-3 staticControl is-invalid'], ['label' => ['class' => 'form-label', 'for' => 'title']], 'Title', '/label', @@ -345,7 +345,7 @@ public function testDefaultAlignStaticControlWithErrorAndHelp() 'help' => 'Help text', ]); $expected = [ - 'div' => ['class' => 'mb-3 form-group staticControl is-invalid'], + 'div' => ['class' => 'mb-3 staticControl is-invalid'], ['label' => ['class' => 'form-label', 'for' => 'title']], 'Title', '/label', @@ -391,7 +391,7 @@ public function testDefaultAlignStaticControlWithErrorAndHelpOptions() ], ]); $expected = [ - 'div' => ['class' => 'mb-3 form-group staticControl is-invalid'], + 'div' => ['class' => 'mb-3 staticControl is-invalid'], ['label' => ['class' => 'form-label', 'for' => 'title']], 'Title', '/label', @@ -438,7 +438,7 @@ public function testDefaultAlignStaticControlContainerOptions() $expected = [ 'div' => [ 'attribute' => 'container-attribute', - 'class' => 'container-class mb-3 form-group staticControl', + 'class' => 'container-class mb-3 staticControl', ], ['label' => ['class' => 'form-label', 'for' => 'title']], 'Title', @@ -476,7 +476,7 @@ public function testDefaultAlignStaticControlContainerOptionsWithError() $expected = [ 'div' => [ 'attribute' => 'container-attribute', - 'class' => 'container-class mb-3 form-group staticControl is-invalid', + 'class' => 'container-class mb-3 staticControl is-invalid', ], ['label' => ['class' => 'form-label', 'for' => 'title']], 'Title', diff --git a/tests/TestCase/View/Helper/FormHelper/DefaultAlign/TextControlTest.php b/tests/TestCase/View/Helper/FormHelper/DefaultAlign/TextControlTest.php index 2bbd0c28..00dcb3c5 100644 --- a/tests/TestCase/View/Helper/FormHelper/DefaultAlign/TextControlTest.php +++ b/tests/TestCase/View/Helper/FormHelper/DefaultAlign/TextControlTest.php @@ -14,7 +14,7 @@ public function testDefaultAlignTextControl() $result = $this->Form->control('title'); $expected = [ - 'div' => ['class' => 'mb-3 form-group text'], + 'div' => ['class' => 'mb-3 text'], ['label' => ['class' => 'form-label', 'for' => 'title']], 'Title', '/label', @@ -40,7 +40,7 @@ public function testDefaultAlignTextControlWithFloatingLabel() ], ]); $expected = [ - 'div' => ['class' => 'mb-3 form-floating form-group text'], + 'div' => ['class' => 'mb-3 form-floating text'], 'input' => [ 'type' => 'text', 'name' => 'title', @@ -68,7 +68,7 @@ public function testDefaultAlignTextControlWithFloatingLabelAndCustomLabelText() ], ]); $expected = [ - 'div' => ['class' => 'mb-3 form-floating form-group text'], + 'div' => ['class' => 'mb-3 form-floating text'], 'input' => [ 'type' => 'text', 'name' => 'title', @@ -96,7 +96,7 @@ public function testDefaultAlignTextControlWithFloatingLabelAndCustomPlaceholder 'placeholder' => 'Custom Placeholder', ]); $expected = [ - 'div' => ['class' => 'mb-3 form-floating form-group text'], + 'div' => ['class' => 'mb-3 form-floating text'], 'input' => [ 'type' => 'text', 'name' => 'title', @@ -124,7 +124,7 @@ public function testDefaultAlignTextControlWithFloatingLabelAndDisabledPlacehold 'placeholder' => false, ]); $expected = [ - 'div' => ['class' => 'mb-3 form-floating form-group text'], + 'div' => ['class' => 'mb-3 form-floating text'], 'input' => [ 'type' => 'text', 'name' => 'title', @@ -146,7 +146,7 @@ public function testDefaultAlignTextControlWithDisabledLabel() $result = $this->Form->control('title', ['label' => false]); $expected = [ - 'div' => ['class' => 'mb-3 form-group text'], + 'div' => ['class' => 'mb-3 text'], 'input' => [ 'type' => 'text', 'name' => 'title', @@ -165,7 +165,7 @@ public function testDefaultAlignTextControlWithCustomLabel() $result = $this->Form->control('title', ['label' => 'Custom Label']); $expected = [ - 'div' => ['class' => 'mb-3 form-group text'], + 'div' => ['class' => 'mb-3 text'], ['label' => ['class' => 'form-label', 'for' => 'title']], 'Custom Label', '/label', @@ -193,7 +193,7 @@ public function testDefaultAlignTextControlWithCustomLabelOptions() ], ]); $expected = [ - 'div' => ['class' => 'mb-3 form-group text'], + 'div' => ['class' => 'mb-3 text'], 'label' => ['for' => 'title', 'class' => 'custom-label-class form-label', 'foo' => 'bar'], 'Custom Label', '/label', @@ -217,7 +217,7 @@ public function testDefaultAlignTextControlWithHelp() 'help' => 'Help text', ]); $expected = [ - 'div' => ['class' => 'mb-3 form-group text'], + 'div' => ['class' => 'mb-3 text'], ['label' => ['class' => 'form-label', 'for' => 'title']], 'Title', '/label', @@ -250,7 +250,7 @@ public function testDefaultAlignTextControlWithHelpOptions() ], ]); $expected = [ - 'div' => ['class' => 'mb-3 form-group text'], + 'div' => ['class' => 'mb-3 text'], ['label' => ['class' => 'form-label', 'for' => 'title']], 'Title', '/label', @@ -282,7 +282,7 @@ public function testDefaultAlignTextControlWithTooltip() 'tooltip' => 'Tooltip text', ]); $expected = [ - 'div' => ['class' => 'mb-3 form-group text'], + 'div' => ['class' => 'mb-3 text'], ['label' => ['class' => 'form-label', 'for' => 'title']], 'Title', 'span' => [ @@ -313,7 +313,7 @@ public function testDefaultAlignTextControlWithError() $result = $this->Form->control('title'); $expected = [ - 'div' => ['class' => 'mb-3 form-group text is-invalid'], + 'div' => ['class' => 'mb-3 text is-invalid'], ['label' => ['class' => 'form-label', 'for' => 'title']], 'Title', '/label', @@ -346,7 +346,7 @@ public function testDefaultAlignTextControlWithErrorAndHelp() 'help' => 'Help text', ]); $expected = [ - 'div' => ['class' => 'mb-3 form-group text is-invalid'], + 'div' => ['class' => 'mb-3 text is-invalid'], ['label' => ['class' => 'form-label', 'for' => 'title']], 'Title', '/label', @@ -386,7 +386,7 @@ public function testDefaultAlignTextControlWithErrorAndHelpOptions() ], ]); $expected = [ - 'div' => ['class' => 'mb-3 form-group text is-invalid'], + 'div' => ['class' => 'mb-3 text is-invalid'], ['label' => ['class' => 'form-label', 'for' => 'title']], 'Title', '/label', @@ -428,7 +428,7 @@ public function testDefaultAlignTextControlContainerOptions() $expected = [ 'div' => [ 'attribute' => 'container-attribute', - 'class' => 'container-class mb-3 form-group text', + 'class' => 'container-class mb-3 text', ], ['label' => ['class' => 'form-label', 'for' => 'title']], 'Title', @@ -462,7 +462,7 @@ public function testDefaultAlignTextControlContainerOptionsWithError() $expected = [ 'div' => [ 'attribute' => 'container-attribute', - 'class' => 'container-class mb-3 form-group text is-invalid', + 'class' => 'container-class mb-3 text is-invalid', ], ['label' => ['class' => 'form-label', 'for' => 'title']], 'Title', diff --git a/tests/TestCase/View/Helper/FormHelper/HorizontalAlign/CheckboxControlTest.php b/tests/TestCase/View/Helper/FormHelper/HorizontalAlign/CheckboxControlTest.php index b196722f..2ba87dad 100644 --- a/tests/TestCase/View/Helper/FormHelper/HorizontalAlign/CheckboxControlTest.php +++ b/tests/TestCase/View/Helper/FormHelper/HorizontalAlign/CheckboxControlTest.php @@ -23,7 +23,7 @@ public function testHorizontalAlignCheckboxControl() 'type' => 'checkbox', ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group row checkbox']], + ['div' => ['class' => 'mb-3 row checkbox']], ['div' => ['class' => 'offset-sm-5 col-sm-7']], ['div' => ['class' => 'form-check']], ['input' => [ @@ -64,7 +64,7 @@ public function testHorizontalAlignCheckboxControlWithDisabledLabel() 'label' => false, ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group row checkbox']], + ['div' => ['class' => 'mb-3 row checkbox']], ['div' => ['class' => 'offset-sm-5 col-sm-7']], ['div' => ['class' => 'form-check']], ['input' => [ @@ -102,7 +102,7 @@ public function testHorizontalAlignCheckboxControlWithCustomLabel() 'label' => 'Custom Label', ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group row checkbox']], + ['div' => ['class' => 'mb-3 row checkbox']], ['div' => ['class' => 'offset-sm-5 col-sm-7']], ['div' => ['class' => 'form-check']], ['input' => [ @@ -147,7 +147,7 @@ public function testHorizontalAlignCheckboxControlWithCustomLabelOptions() ], ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group row checkbox']], + ['div' => ['class' => 'mb-3 row checkbox']], ['div' => ['class' => 'offset-sm-5 col-sm-7']], ['div' => ['class' => 'form-check']], ['input' => [ @@ -188,7 +188,7 @@ public function testHorizontalAlignCheckboxControlWithHelp() 'help' => 'Help text', ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group row checkbox']], + ['div' => ['class' => 'mb-3 row checkbox']], ['div' => ['class' => 'offset-sm-5 col-sm-7']], ['div' => ['class' => 'form-check']], ['input' => [ @@ -238,7 +238,7 @@ public function testHorizontalAlignCheckboxControlWithHelpOptions() ], ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group row checkbox']], + ['div' => ['class' => 'mb-3 row checkbox']], ['div' => ['class' => 'offset-sm-5 col-sm-7']], ['div' => ['class' => 'form-check']], ['input' => [ @@ -287,7 +287,7 @@ public function testHorizontalAlignCheckboxControlWithTooltip() 'tooltip' => 'Tooltip text', ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group row checkbox']], + ['div' => ['class' => 'mb-3 row checkbox']], ['div' => ['class' => 'offset-sm-5 col-sm-7']], ['div' => ['class' => 'form-check']], ['input' => [ @@ -334,7 +334,7 @@ public function testHorizontalAlignCheckboxControlWithCustomSpacing() 'spacing' => 'custom-spacing', ]); $expected = [ - ['div' => ['class' => 'custom-spacing form-group row checkbox']], + ['div' => ['class' => 'custom-spacing row checkbox']], ['div' => ['class' => 'offset-sm-5 col-sm-7']], ['div' => ['class' => 'form-check']], ['input' => [ @@ -377,7 +377,7 @@ public function testHorizontalAlignCheckboxControlWithError() 'type' => 'checkbox', ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group row checkbox is-invalid']], + ['div' => ['class' => 'mb-3 row checkbox is-invalid']], ['div' => ['class' => 'offset-sm-5 col-sm-7']], ['div' => ['class' => 'form-check']], ['input' => [ @@ -428,7 +428,7 @@ public function testHorizontalAlignCheckboxControlWithErrorAndHelp() 'help' => 'Help text', ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group row checkbox is-invalid']], + ['div' => ['class' => 'mb-3 row checkbox is-invalid']], ['div' => ['class' => 'offset-sm-5 col-sm-7']], ['div' => ['class' => 'form-check']], ['input' => [ @@ -486,7 +486,7 @@ public function testHorizontalAlignCheckboxControlWithErrorAndHelpOptions() ], ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group row checkbox is-invalid']], + ['div' => ['class' => 'mb-3 row checkbox is-invalid']], ['div' => ['class' => 'offset-sm-5 col-sm-7']], ['div' => ['class' => 'form-check']], ['input' => [ @@ -545,7 +545,7 @@ public function testHorizontalAlignCheckboxControlContainerOptions() $expected = [ ['div' => [ 'attribute' => 'container-attribute', - 'class' => 'container-class mb-3 form-group row checkbox', + 'class' => 'container-class mb-3 row checkbox', ]], ['div' => ['class' => 'offset-sm-5 col-sm-7']], ['div' => ['class' => 'form-check']], @@ -595,7 +595,7 @@ public function testHorizontalAlignCheckboxControlContainerOptionsWithError() $expected = [ ['div' => [ 'attribute' => 'container-attribute', - 'class' => 'container-class mb-3 form-group row checkbox is-invalid', + 'class' => 'container-class mb-3 row checkbox is-invalid', ]], ['div' => ['class' => 'offset-sm-5 col-sm-7']], ['div' => ['class' => 'form-check']], @@ -644,7 +644,7 @@ public function testHorizontalAlignCheckboxControlNestedInput() 'nestedInput' => true, ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group row checkbox']], + ['div' => ['class' => 'mb-3 row checkbox']], ['div' => ['class' => 'offset-sm-5 col-sm-7']], ['div' => ['class' => 'form-check']], ['input' => [ @@ -686,7 +686,7 @@ public function testHorizontalAlignCheckboxControlNestedInputWithTooltip() 'tooltip' => 'Tooltip text', ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group row checkbox']], + ['div' => ['class' => 'mb-3 row checkbox']], ['div' => ['class' => 'offset-sm-5 col-sm-7']], ['div' => ['class' => 'form-check']], ['input' => [ @@ -736,7 +736,7 @@ public function testHorizontalAlignCheckboxControlNestedInputWithError() 'nestedInput' => true, ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group row checkbox is-invalid']], + ['div' => ['class' => 'mb-3 row checkbox is-invalid']], ['div' => ['class' => 'offset-sm-5 col-sm-7']], ['div' => ['class' => 'form-check']], ['input' => [ @@ -784,7 +784,7 @@ public function testHorizontalAlignCheckboxControlInline() 'inline' => true, ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group row checkbox']], + ['div' => ['class' => 'mb-3 row checkbox']], ['div' => ['class' => 'offset-sm-5 col-sm-7']], ['div' => ['class' => 'form-check']], ['input' => [ @@ -826,7 +826,7 @@ public function testHorizontalAlignCheckboxControlInlineWithDisabledLabel() 'label' => false, ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group row checkbox']], + ['div' => ['class' => 'mb-3 row checkbox']], ['div' => ['class' => 'offset-sm-5 col-sm-7']], ['div' => ['class' => 'form-check']], ['input' => [ @@ -865,7 +865,7 @@ public function testHorizontalAlignCheckboxControlInlineWithCustomLabel() 'label' => 'Custom Label', ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group row checkbox']], + ['div' => ['class' => 'mb-3 row checkbox']], ['div' => ['class' => 'offset-sm-5 col-sm-7']], ['div' => ['class' => 'form-check']], ['input' => [ @@ -911,7 +911,7 @@ public function testHorizontalAlignCheckboxControlInlineWithCustomLabelOptions() ], ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group row checkbox']], + ['div' => ['class' => 'mb-3 row checkbox']], ['div' => ['class' => 'offset-sm-5 col-sm-7']], ['div' => ['class' => 'form-check']], ['input' => [ @@ -953,7 +953,7 @@ public function testHorizontalAlignCheckboxControlInlineWithHelp() 'help' => 'Help text', ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group row checkbox']], + ['div' => ['class' => 'mb-3 row checkbox']], ['div' => ['class' => 'offset-sm-5 col-sm-7']], ['div' => ['class' => 'form-check']], ['input' => [ @@ -1004,7 +1004,7 @@ public function testHorizontalAlignCheckboxControlInlineWithHelpOptions() ], ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group row checkbox']], + ['div' => ['class' => 'mb-3 row checkbox']], ['div' => ['class' => 'offset-sm-5 col-sm-7']], ['div' => ['class' => 'form-check']], ['input' => [ @@ -1054,7 +1054,7 @@ public function testHorizontalAlignCheckboxControlInlineWithTooltip() 'tooltip' => 'Tooltip text', ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group row checkbox']], + ['div' => ['class' => 'mb-3 row checkbox']], ['div' => ['class' => 'offset-sm-5 col-sm-7']], ['div' => ['class' => 'form-check']], ['input' => [ @@ -1104,7 +1104,7 @@ public function testHorizontalAlignCheckboxControlInlineWithError() 'inline' => true, ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group row checkbox is-invalid']], + ['div' => ['class' => 'mb-3 row checkbox is-invalid']], ['div' => ['class' => 'offset-sm-5 col-sm-7']], ['div' => ['class' => 'form-check']], ['input' => [ @@ -1158,7 +1158,7 @@ public function testHorizontalAlignCheckboxControlInlineContainerOptions() $expected = [ ['div' => [ 'attribute' => 'container-attribute', - 'class' => 'container-class mb-3 form-group row checkbox', + 'class' => 'container-class mb-3 row checkbox', ]], ['div' => ['class' => 'offset-sm-5 col-sm-7']], ['div' => ['class' => 'form-check']], @@ -1209,7 +1209,7 @@ public function testHorizontalAlignCheckboxControlInlineContainerOptionsWithErro $expected = [ ['div' => [ 'attribute' => 'container-attribute', - 'class' => 'container-class mb-3 form-group row checkbox is-invalid', + 'class' => 'container-class mb-3 row checkbox is-invalid', ]], ['div' => ['class' => 'offset-sm-5 col-sm-7']], ['div' => ['class' => 'form-check']], @@ -1259,7 +1259,7 @@ public function testHorizontalAlignCheckboxControlInlineNestedInput() 'nestedInput' => true, ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group row checkbox']], + ['div' => ['class' => 'mb-3 row checkbox']], ['div' => ['class' => 'offset-sm-5 col-sm-7']], ['div' => ['class' => 'form-check']], ['input' => [ @@ -1302,7 +1302,7 @@ public function testHorizontalAlignCheckboxControlInlineNestedInputWithTooltip() 'tooltip' => 'Tooltip text', ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group row checkbox']], + ['div' => ['class' => 'mb-3 row checkbox']], ['div' => ['class' => 'offset-sm-5 col-sm-7']], ['div' => ['class' => 'form-check']], ['input' => [ @@ -1349,7 +1349,7 @@ public function testHorizontalAlignCheckboxControlSwitch() 'switch' => true, ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group row checkbox']], + ['div' => ['class' => 'mb-3 row checkbox']], ['div' => ['class' => 'offset-sm-5 col-sm-7']], ['div' => ['class' => 'form-check form-switch']], ['input' => [ diff --git a/tests/TestCase/View/Helper/FormHelper/HorizontalAlign/ColorControlTest.php b/tests/TestCase/View/Helper/FormHelper/HorizontalAlign/ColorControlTest.php index 6cb7d29b..f5c64e2c 100644 --- a/tests/TestCase/View/Helper/FormHelper/HorizontalAlign/ColorControlTest.php +++ b/tests/TestCase/View/Helper/FormHelper/HorizontalAlign/ColorControlTest.php @@ -24,7 +24,7 @@ public function testHorizontalAlignColorControl() 'value' => '#ffffff', ]); $expected = [ - 'div' => ['class' => 'mb-3 form-group row color'], + 'div' => ['class' => 'mb-3 row color'], 'label' => ['class' => 'col-form-label col-sm-5', 'for' => 'color'], 'Color', '/label', @@ -59,7 +59,7 @@ public function testHorizontalAlignColorControlWithDisabledLabel() 'label' => false, ]); $expected = [ - 'div' => ['class' => 'mb-3 form-group row color'], + 'div' => ['class' => 'mb-3 row color'], ['div' => ['class' => 'col-sm-7']], 'input' => [ 'type' => 'color', @@ -92,7 +92,7 @@ public function testHorizontalAlignColorControlWithCustomLabel() 'label' => 'Custom Label', ]); $expected = [ - 'div' => ['class' => 'mb-3 form-group row color'], + 'div' => ['class' => 'mb-3 row color'], 'label' => ['class' => 'col-form-label col-sm-5', 'for' => 'color'], 'Custom Label', '/label', @@ -132,7 +132,7 @@ public function testHorizontalAlignColorControlWithCustomLabelOptions() ], ]); $expected = [ - 'div' => ['class' => 'mb-3 form-group row color'], + 'div' => ['class' => 'mb-3 row color'], 'label' => [ 'for' => 'color', 'class' => 'custom-label-class col-form-label col-sm-5', @@ -172,7 +172,7 @@ public function testHorizontalAlignColorControlWithHelp() 'help' => 'Help text', ]); $expected = [ - 'div' => ['class' => 'mb-3 form-group row color'], + 'div' => ['class' => 'mb-3 row color'], 'label' => ['class' => 'col-form-label col-sm-5', 'for' => 'color'], 'Color', '/label', @@ -217,7 +217,7 @@ public function testHorizontalAlignColorControlWithHelpOptions() ], ]); $expected = [ - 'div' => ['class' => 'mb-3 form-group row color'], + 'div' => ['class' => 'mb-3 row color'], 'label' => ['class' => 'col-form-label col-sm-5', 'for' => 'color'], 'Color', '/label', @@ -261,7 +261,7 @@ public function testHorizontalAlignColorControlWithTooltip() 'tooltip' => 'Tooltip text', ]); $expected = [ - 'div' => ['class' => 'mb-3 form-group row color'], + 'div' => ['class' => 'mb-3 row color'], 'label' => ['class' => 'col-form-label col-sm-5', 'for' => 'color'], 'Color', 'span' => [ @@ -302,7 +302,7 @@ public function testHorizontalAlignColorControlWithCustomSpacing() 'spacing' => 'custom-spacing', ]); $expected = [ - 'div' => ['class' => 'custom-spacing form-group row color'], + 'div' => ['class' => 'custom-spacing row color'], 'label' => ['class' => 'col-form-label col-sm-5', 'for' => 'color'], 'Color', '/label', @@ -340,7 +340,7 @@ public function testHorizontalAlignColorControlWithError() 'value' => '#ffffff', ]); $expected = [ - 'div' => ['class' => 'mb-3 form-group row color is-invalid'], + 'div' => ['class' => 'mb-3 row color is-invalid'], 'label' => ['class' => 'col-form-label col-sm-5', 'for' => 'color'], 'Color', '/label', @@ -384,7 +384,7 @@ public function testHorizontalAlignColorControlWithErrorAndHelp() 'help' => 'Help text', ]); $expected = [ - 'div' => ['class' => 'mb-3 form-group row color is-invalid'], + 'div' => ['class' => 'mb-3 row color is-invalid'], 'label' => ['class' => 'col-form-label col-sm-5', 'for' => 'color'], 'Color', '/label', @@ -436,7 +436,7 @@ public function testHorizontalAlignColorControlWithErrorAndHelpOptions() ], ]); $expected = [ - 'div' => ['class' => 'mb-3 form-group row color is-invalid'], + 'div' => ['class' => 'mb-3 row color is-invalid'], 'label' => ['class' => 'col-form-label col-sm-5', 'for' => 'color'], 'Color', '/label', @@ -490,7 +490,7 @@ public function testHorizontalAlignColorControlContainerOptions() $expected = [ 'div' => [ 'attribute' => 'container-attribute', - 'class' => 'container-class mb-3 form-group row color', + 'class' => 'container-class mb-3 row color', ], 'label' => ['class' => 'col-form-label col-sm-5', 'for' => 'color',], 'Color', @@ -535,7 +535,7 @@ public function testHorizontalAlignColorControlContainerOptionsWithError() $expected = [ 'div' => [ 'attribute' => 'container-attribute', - 'class' => 'container-class mb-3 form-group row color is-invalid', + 'class' => 'container-class mb-3 row color is-invalid', ], 'label' => ['class' => 'col-form-label col-sm-5', 'for' => 'color',], 'Color', diff --git a/tests/TestCase/View/Helper/FormHelper/HorizontalAlign/DateTimeControlTest.php b/tests/TestCase/View/Helper/FormHelper/HorizontalAlign/DateTimeControlTest.php index a0096d8b..4c2d4555 100644 --- a/tests/TestCase/View/Helper/FormHelper/HorizontalAlign/DateTimeControlTest.php +++ b/tests/TestCase/View/Helper/FormHelper/HorizontalAlign/DateTimeControlTest.php @@ -27,7 +27,7 @@ public function testHorizontalAlignDateTimeControl() 'value' => $now->format('Y-m-d H:i:s'), ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group row datetime-local']], + ['div' => ['class' => 'mb-3 row datetime-local']], ['label' => ['class' => 'col-form-label col-sm-5', 'for' => 'created']], 'Created', '/label', @@ -64,7 +64,7 @@ public function testHorizontalAlignDateTimeControlWithDisabledLabel() 'label' => false, ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group row datetime-local']], + ['div' => ['class' => 'mb-3 row datetime-local']], ['div' => ['class' => 'col-sm-7']], 'input' => [ 'type' => 'datetime-local', @@ -98,7 +98,7 @@ public function testHorizontalAlignDateTimeControlWithCustomLabel() 'label' => 'Custom Label', ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group row datetime-local']], + ['div' => ['class' => 'mb-3 row datetime-local']], ['label' => ['class' => 'col-form-label col-sm-5', 'for' => 'created']], 'Custom Label', '/label', @@ -139,7 +139,7 @@ public function testHorizontalAlignDateTimeControlWithCustomLabelOptions() ], ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group row datetime-local']], + ['div' => ['class' => 'mb-3 row datetime-local']], ['label' => ['class' => 'custom-label-class col-form-label col-sm-5', 'foo' => 'bar', 'for' => 'created']], 'Custom Label', '/label', @@ -176,7 +176,7 @@ public function testHorizontalAlignDateTimeControlWithHelp() 'help' => 'Help text', ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group row time']], + ['div' => ['class' => 'mb-3 row time']], ['label' => ['class' => 'col-form-label col-sm-5', 'for' => 'created']], 'Created', '/label', @@ -223,7 +223,7 @@ public function testHorizontalAlignDateTimeControlWithHelpOptions() ], ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group row time']], + ['div' => ['class' => 'mb-3 row time']], ['label' => ['class' => 'col-form-label col-sm-5', 'for' => 'created']], 'Created', '/label', @@ -269,7 +269,7 @@ public function testHorizontalAlignDateTimeControlWithTooltip() 'tooltip' => 'Tooltip text', ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group row time']], + ['div' => ['class' => 'mb-3 row time']], ['label' => ['class' => 'col-form-label col-sm-5', 'for' => 'created']], 'Created ', 'span' => [ @@ -313,7 +313,7 @@ public function testHorizontalAlignDateTimeControlWithCustomSpacing() 'spacing' => 'custom-spacing', ]); $expected = [ - ['div' => ['class' => 'custom-spacing form-group row datetime-local']], + ['div' => ['class' => 'custom-spacing row datetime-local']], ['label' => ['class' => 'col-form-label col-sm-5', 'for' => 'created']], 'Created', '/label', @@ -353,7 +353,7 @@ public function testHorizontalAlignDateTimeControlWithError() ]); $expected = [ ['div' => [ - 'class' => 'mb-3 form-group row datetime-local is-invalid', + 'class' => 'mb-3 row datetime-local is-invalid', ]], ['label' => ['class' => 'col-form-label col-sm-5', 'for' => 'created']], 'Created', @@ -401,7 +401,7 @@ public function testHorizontalAlignDateTimeControlWithErrorAndHelp() ]); $expected = [ ['div' => [ - 'class' => 'mb-3 form-group row datetime-local is-invalid', + 'class' => 'mb-3 row datetime-local is-invalid', ]], ['label' => ['class' => 'col-form-label col-sm-5', 'for' => 'created']], 'Created', @@ -456,7 +456,7 @@ public function testHorizontalAlignDateTimeControlWithErrorAndHelpOptions() ]); $expected = [ ['div' => [ - 'class' => 'mb-3 form-group row datetime-local is-invalid', + 'class' => 'mb-3 row datetime-local is-invalid', ]], ['label' => ['class' => 'col-form-label col-sm-5', 'for' => 'created']], 'Created', @@ -511,7 +511,7 @@ public function testHorizontalAlignDateTimeControlContainerOptions() $expected = [ ['div' => [ 'attribute' => 'container-attribute', - 'class' => 'container-class mb-3 form-group row datetime-local', + 'class' => 'container-class mb-3 row datetime-local', ]], ['label' => ['class' => 'col-form-label col-sm-5', 'for' => 'created']], 'Created', @@ -557,7 +557,7 @@ public function testHorizontalAlignDateTimeControlContainerOptionsWithError() $expected = [ ['div' => [ 'attribute' => 'container-attribute', - 'class' => 'container-class mb-3 form-group row datetime-local is-invalid', + 'class' => 'container-class mb-3 row datetime-local is-invalid', ]], ['label' => ['class' => 'col-form-label col-sm-5', 'for' => 'created']], 'Created', @@ -600,7 +600,7 @@ public function testHorizontalAlignDateTimeControlDate() 'value' => $now, ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group row date']], + ['div' => ['class' => 'mb-3 row date']], ['label' => ['class' => 'col-form-label col-sm-5', 'for' => 'created']], 'Created', '/label', @@ -636,7 +636,7 @@ public function testHorizontalAlignDateTimeControlTime() 'value' => $now, ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group row time']], + ['div' => ['class' => 'mb-3 row time']], ['label' => ['class' => 'col-form-label col-sm-5', 'for' => 'created']], 'Created', '/label', @@ -669,17 +669,17 @@ public function testHorizontalAlignDateTimeControlCustomContainerTemplateViaTemp $result = $this->Form->control('created', [ 'type' => 'datetime', ]); - $this->assertStringContainsString('
', $result); + $this->assertStringContainsString('
', $result); $result = $this->Form->control('created', [ 'type' => 'date', ]); - $this->assertStringContainsString('
', $result); + $this->assertStringContainsString('
', $result); $result = $this->Form->control('created', [ 'type' => 'time', ]); - $this->assertStringContainsString('
', $result); + $this->assertStringContainsString('
', $result); $this->Form->setTemplates([ 'datetimeContainer' => '
{{content}}
', @@ -721,17 +721,17 @@ public function testHorizontalAlignDateTimeControlCustomContainerErrorTemplateVi $result = $this->Form->control('created', [ 'type' => 'datetime', ]); - $this->assertStringContainsString('
', $result); + $this->assertStringContainsString('
', $result); $result = $this->Form->control('created', [ 'type' => 'date', ]); - $this->assertStringContainsString('
', $result); + $this->assertStringContainsString('
', $result); $result = $this->Form->control('created', [ 'type' => 'time', ]); - $this->assertStringContainsString('
', $result); + $this->assertStringContainsString('
', $result); $result = $this->Form->control('created', [ 'type' => 'datetime', diff --git a/tests/TestCase/View/Helper/FormHelper/HorizontalAlign/FileControlTest.php b/tests/TestCase/View/Helper/FormHelper/HorizontalAlign/FileControlTest.php index 49a2867f..f64549d3 100644 --- a/tests/TestCase/View/Helper/FormHelper/HorizontalAlign/FileControlTest.php +++ b/tests/TestCase/View/Helper/FormHelper/HorizontalAlign/FileControlTest.php @@ -23,7 +23,7 @@ public function testHorizontalAlignFileControl() 'type' => 'file', ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group row file']], + ['div' => ['class' => 'mb-3 row file']], ['label' => ['class' => 'col-form-label col-sm-5', 'for' => 'file']], 'File', '/label', @@ -56,7 +56,7 @@ public function testHorizontalAlignFileControlWithDisabledLabel() 'label' => false, ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group row file']], + ['div' => ['class' => 'mb-3 row file']], ['div' => ['class' => 'col-sm-7']], ['input' => [ 'type' => 'file', @@ -86,7 +86,7 @@ public function testHorizontalAlignFileControlWithCustomLabel() 'label' => 'Custom Label', ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group row file']], + ['div' => ['class' => 'mb-3 row file']], ['label' => ['class' => 'col-form-label col-sm-5', 'for' => 'file']], 'Custom Label', '/label', @@ -123,7 +123,7 @@ public function testHorizontalAlignFileControlWithCustomLabelOptions() ], ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group row file']], + ['div' => ['class' => 'mb-3 row file']], ['label' => [ 'class' => 'custom-label-class col-form-label col-sm-5', 'foo' => 'bar', @@ -160,7 +160,7 @@ public function testHorizontalAlignFileControlWithHelp() 'help' => 'Help text', ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group row file']], + ['div' => ['class' => 'mb-3 row file']], ['label' => ['class' => 'col-form-label col-sm-5', 'for' => 'file']], 'File', '/label', @@ -202,7 +202,7 @@ public function testHorizontalAlignFileControlWithHelpOptions() ], ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group row file']], + ['div' => ['class' => 'mb-3 row file']], ['label' => ['class' => 'col-form-label col-sm-5', 'for' => 'file']], 'File', '/label', @@ -243,7 +243,7 @@ public function testHorizontalAlignFileControlWithTooltip() 'tooltip' => 'Tooltip text', ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group row file']], + ['div' => ['class' => 'mb-3 row file']], ['label' => ['class' => 'col-form-label col-sm-5', 'for' => 'file']], 'File ', 'span' => [ @@ -282,7 +282,7 @@ public function testHorizontalAlignFileControlWithCustomSpacing() 'spacing' => 'custom-spacing', ]); $expected = [ - ['div' => ['class' => 'custom-spacing form-group row file']], + ['div' => ['class' => 'custom-spacing row file']], ['label' => ['class' => 'col-form-label col-sm-5', 'for' => 'file']], 'File', '/label', @@ -317,7 +317,7 @@ public function testHorizontalAlignFileControlWithError() 'type' => 'file', ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group row file is-invalid']], + ['div' => ['class' => 'mb-3 row file is-invalid']], ['label' => ['class' => 'col-form-label col-sm-5', 'for' => 'file']], 'File', '/label', @@ -358,7 +358,7 @@ public function testHorizontalAlignFileControlWithErrorAndHelp() 'help' => 'Help text', ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group row file is-invalid']], + ['div' => ['class' => 'mb-3 row file is-invalid']], ['label' => ['class' => 'col-form-label col-sm-5', 'for' => 'file']], 'File', '/label', @@ -407,7 +407,7 @@ public function testHorizontalAlignFileControlWithErrorAndHelpOptions() ], ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group row file is-invalid']], + ['div' => ['class' => 'mb-3 row file is-invalid']], ['label' => ['class' => 'col-form-label col-sm-5', 'for' => 'file']], 'File', '/label', @@ -457,7 +457,7 @@ public function testHorizontalAlignFileControlContainerOptions() $expected = [ ['div' => [ 'attribute' => 'container-attribute', - 'class' => 'container-class mb-3 form-group row file', + 'class' => 'container-class mb-3 row file', ]], ['label' => ['class' => 'col-form-label col-sm-5', 'for' => 'file']], 'File', @@ -499,7 +499,7 @@ public function testHorizontalAlignFileControlContainerOptionsWithError() $expected = [ ['div' => [ 'attribute' => 'container-attribute', - 'class' => 'container-class mb-3 form-group row file is-invalid', + 'class' => 'container-class mb-3 row file is-invalid', ]], ['label' => ['class' => 'col-form-label col-sm-5', 'for' => 'file']], 'File', @@ -538,7 +538,7 @@ public function testHorizontalAlignFileControlInputGroupAppend() 'append' => 'append', ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group row file']], + ['div' => ['class' => 'mb-3 row file']], ['label' => ['class' => 'col-form-label col-sm-5', 'for' => 'file']], 'File', '/label', @@ -576,7 +576,7 @@ public function testHorizontalAlignFileControlInputGroupPrepend() 'prepend' => 'prepend', ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group row file']], + ['div' => ['class' => 'mb-3 row file']], ['label' => ['class' => 'col-form-label col-sm-5', 'for' => 'file']], 'File', '/label', @@ -617,7 +617,7 @@ public function testHorizontalAlignFileControlInputGroupWithError() 'append' => 'append', ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group row file is-invalid']], + ['div' => ['class' => 'mb-3 row file is-invalid']], ['label' => ['class' => 'col-form-label col-sm-5', 'for' => 'file']], 'File', '/label', diff --git a/tests/TestCase/View/Helper/FormHelper/HorizontalAlign/MultipleCheckboxControlTest.php b/tests/TestCase/View/Helper/FormHelper/HorizontalAlign/MultipleCheckboxControlTest.php index 7c32cb80..b7299241 100644 --- a/tests/TestCase/View/Helper/FormHelper/HorizontalAlign/MultipleCheckboxControlTest.php +++ b/tests/TestCase/View/Helper/FormHelper/HorizontalAlign/MultipleCheckboxControlTest.php @@ -27,7 +27,7 @@ public function testHorizontalAlignMultipleCheckboxControl() ], ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group row multicheckbox', 'role' => 'group', 'aria-labelledby' => 'users-group-label']], + ['div' => ['class' => 'mb-3 row multicheckbox', 'role' => 'group', 'aria-labelledby' => 'users-group-label']], ['label' => ['id' => 'users-group-label', 'class' => 'col-form-label col-sm-5 d-block pt-0']], 'Users', '/label', @@ -90,7 +90,7 @@ public function testHorizontalAlignMultipleCheckboxControlWithDisabledLabel() ]); $expected = [ ['div' => [ - 'class' => 'mb-3 form-group row multicheckbox', + 'class' => 'mb-3 row multicheckbox', 'role' => 'group', 'aria-labelledby' => 'users-group-label', ]], @@ -153,7 +153,7 @@ public function testHorizontalAlignMultipleCheckboxControlWithCustomLabel() ]); $expected = [ ['div' => [ - 'class' => 'mb-3 form-group row multicheckbox', + 'class' => 'mb-3 row multicheckbox', 'role' => 'group', 'aria-labelledby' => 'users-group-label', ]], @@ -223,7 +223,7 @@ public function testHorizontalAlignMultipleCheckboxControlWithCustomLabelOptions ]); $expected = [ ['div' => [ - 'class' => 'mb-3 form-group row multicheckbox', + 'class' => 'mb-3 row multicheckbox', 'role' => 'group', 'aria-labelledby' => 'users-group-label', ]], @@ -289,7 +289,7 @@ public function testHorizontalAlignMultipleCheckboxControlWithHelp() ]); $expected = [ ['div' => [ - 'class' => 'mb-3 form-group row multicheckbox', + 'class' => 'mb-3 row multicheckbox', 'role' => 'group', 'aria-labelledby' => 'users-group-label', ]], @@ -364,7 +364,7 @@ public function testHorizontalAlignMultipleCheckboxControlWithHelpOptions() ]); $expected = [ ['div' => [ - 'class' => 'mb-3 form-group row multicheckbox', + 'class' => 'mb-3 row multicheckbox', 'role' => 'group', 'aria-labelledby' => 'users-group-label', ]], @@ -434,7 +434,7 @@ public function testHorizontalAlignMultipleCheckboxControlWithTooltip() 'tooltip' => 'Tooltip text', ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group row multicheckbox', 'role' => 'group', 'aria-labelledby' => 'users-group-label']], + ['div' => ['class' => 'mb-3 row multicheckbox', 'role' => 'group', 'aria-labelledby' => 'users-group-label']], ['label' => ['id' => 'users-group-label', 'class' => 'col-form-label col-sm-5 d-block pt-0']], 'Users ', 'span' => [ @@ -475,7 +475,7 @@ public function testHorizontalAlignMultipleCheckboxControlWithCustomSpacing() ]); $expected = [ ['div' => [ - 'class' => 'custom-spacing form-group row multicheckbox', + 'class' => 'custom-spacing row multicheckbox', 'role' => 'group', 'aria-labelledby' => 'users-group-label', ]], @@ -518,7 +518,7 @@ public function testHorizontalAlignMultipleCheckboxControlWithError() ]); $expected = [ ['div' => [ - 'class' => 'mb-3 form-group row multicheckbox is-invalid', + 'class' => 'mb-3 row multicheckbox is-invalid', 'role' => 'group', 'aria-labelledby' => 'users-group-label', ]], @@ -594,7 +594,7 @@ public function testHorizontalAlignMultipleCheckboxControlWithErrorAndHelp() ]); $expected = [ ['div' => [ - 'class' => 'mb-3 form-group row multicheckbox is-invalid', + 'class' => 'mb-3 row multicheckbox is-invalid', 'role' => 'group', 'aria-labelledby' => 'users-group-label', ]], @@ -678,7 +678,7 @@ public function testHorizontalAlignMultipleCheckboxControlWithErrorAndHelpOption ]); $expected = [ ['div' => [ - 'class' => 'mb-3 form-group row multicheckbox is-invalid', + 'class' => 'mb-3 row multicheckbox is-invalid', 'role' => 'group', 'aria-labelledby' => 'users-group-label', ]], @@ -762,7 +762,7 @@ public function testHorizontalAlignMultipleCheckboxControlContainerOptions() $expected = [ ['div' => [ 'attribute' => 'container-attribute', - 'class' => 'container-class mb-3 form-group row multicheckbox', + 'class' => 'container-class mb-3 row multicheckbox', 'role' => 'group', 'aria-labelledby' => 'users-group-label', ]], @@ -834,7 +834,7 @@ public function testHorizontalAlignMultipleCheckboxControlContainerOptionsWithEr $expected = [ ['div' => [ 'attribute' => 'container-attribute', - 'class' => 'container-class mb-3 form-group row multicheckbox is-invalid', + 'class' => 'container-class mb-3 row multicheckbox is-invalid', 'role' => 'group', 'aria-labelledby' => 'users-group-label', ]], @@ -906,7 +906,7 @@ public function testHorizontalAlignMultipleCheckboxControlNestedInput() 'nestedInput' => true, ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group row multicheckbox', 'role' => 'group', 'aria-labelledby' => 'users-group-label']], + ['div' => ['class' => 'mb-3 row multicheckbox', 'role' => 'group', 'aria-labelledby' => 'users-group-label']], ['label' => ['id' => 'users-group-label', 'class' => 'col-form-label col-sm-5 d-block pt-0']], 'Users', '/label', @@ -971,7 +971,7 @@ public function testHorizontalAlignMultipleCheckboxControlNestedInputWithError() ]); $expected = [ ['div' => [ - 'class' => 'mb-3 form-group row multicheckbox is-invalid', + 'class' => 'mb-3 row multicheckbox is-invalid', 'role' => 'group', 'aria-labelledby' => 'users-group-label', ]], @@ -1043,7 +1043,7 @@ public function testHorizontalAlignMultipleCheckboxControlInline() 'inline' => true, ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group row multicheckbox', 'role' => 'group', 'aria-labelledby' => 'users-group-label']], + ['div' => ['class' => 'mb-3 row multicheckbox', 'role' => 'group', 'aria-labelledby' => 'users-group-label']], ['label' => ['id' => 'users-group-label', 'class' => 'col-form-label col-sm-5 d-block pt-0']], 'Users', '/label', @@ -1106,7 +1106,7 @@ public function testHorizontalAlignMultipleCheckboxControlInlineWithDisabledLabe ]); $expected = [ ['div' => [ - 'class' => 'mb-3 form-group row multicheckbox', + 'class' => 'mb-3 row multicheckbox', 'role' => 'group', 'aria-labelledby' => 'users-group-label', ]], @@ -1169,7 +1169,7 @@ public function testHorizontalAlignMultipleCheckboxControlInlineWithCustomLabel( ]); $expected = [ ['div' => [ - 'class' => 'mb-3 form-group row multicheckbox', + 'class' => 'mb-3 row multicheckbox', 'role' => 'group', 'aria-labelledby' => 'users-group-label', ]], @@ -1239,7 +1239,7 @@ public function testHorizontalAlignMultipleCheckboxControlInlineWithCustomLabelO ]); $expected = [ ['div' => [ - 'class' => 'mb-3 form-group row multicheckbox', + 'class' => 'mb-3 row multicheckbox', 'role' => 'group', 'aria-labelledby' => 'users-group-label', ]], @@ -1305,7 +1305,7 @@ public function testHorizontalAlignMultipleCheckboxControlInlineWithHelp() ]); $expected = [ ['div' => [ - 'class' => 'mb-3 form-group row multicheckbox', + 'class' => 'mb-3 row multicheckbox', 'role' => 'group', 'aria-labelledby' => 'users-group-label', ]], @@ -1381,7 +1381,7 @@ public function testHorizontalAlignMultipleCheckboxControlInlineWithHelpOptions( ]); $expected = [ ['div' => [ - 'class' => 'mb-3 form-group row multicheckbox', + 'class' => 'mb-3 row multicheckbox', 'role' => 'group', 'aria-labelledby' => 'users-group-label', ]], @@ -1452,7 +1452,7 @@ public function testHorizontalAlignMultipleCheckboxControlInlineWithTooltip() 'tooltip' => 'Tooltip text', ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group row multicheckbox', 'role' => 'group', 'aria-labelledby' => 'users-group-label']], + ['div' => ['class' => 'mb-3 row multicheckbox', 'role' => 'group', 'aria-labelledby' => 'users-group-label']], ['label' => ['id' => 'users-group-label', 'class' => 'col-form-label col-sm-5 d-block pt-0']], 'Users ', 'span' => [ @@ -1499,7 +1499,7 @@ public function testHorizontalAlignMultipleCheckboxControlInlineWithError() ]); $expected = [ ['div' => [ - 'class' => 'mb-3 form-group row multicheckbox is-invalid', + 'class' => 'mb-3 row multicheckbox is-invalid', 'role' => 'group', 'aria-labelledby' => 'users-group-label', ]], @@ -1577,7 +1577,7 @@ public function testHorizontalAlignMultipleCheckboxControlInlineContainerOptions $expected = [ ['div' => [ 'attribute' => 'container-attribute', - 'class' => 'container-class mb-3 form-group row multicheckbox', + 'class' => 'container-class mb-3 row multicheckbox', 'role' => 'group', 'aria-labelledby' => 'users-group-label', ]], @@ -1650,7 +1650,7 @@ public function testHorizontalAlignMultipleCheckboxControlInlineContainerOptions $expected = [ ['div' => [ 'attribute' => 'container-attribute', - 'class' => 'container-class mb-3 form-group row multicheckbox is-invalid', + 'class' => 'container-class mb-3 row multicheckbox is-invalid', 'role' => 'group', 'aria-labelledby' => 'users-group-label', ]], @@ -1723,7 +1723,7 @@ public function testHorizontalAlignMultipleCheckboxControlInlineNestedInput() 'nestedInput' => true, ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group row multicheckbox', 'role' => 'group', 'aria-labelledby' => 'users-group-label']], + ['div' => ['class' => 'mb-3 row multicheckbox', 'role' => 'group', 'aria-labelledby' => 'users-group-label']], ['label' => ['id' => 'users-group-label', 'class' => 'col-form-label col-sm-5 d-block pt-0']], 'Users', '/label', @@ -1789,7 +1789,7 @@ public function testHorizontalAlignMultipleCheckboxControlOptionGroups() ], ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group row multicheckbox', 'role' => 'group', 'aria-labelledby' => 'users-group-label']], + ['div' => ['class' => 'mb-3 row multicheckbox', 'role' => 'group', 'aria-labelledby' => 'users-group-label']], ['label' => ['id' => 'users-group-label', 'class' => 'col-form-label col-sm-5 d-block pt-0']], 'Users', '/label', @@ -1800,7 +1800,7 @@ public function testHorizontalAlignMultipleCheckboxControlOptionGroups() 'name' => 'users', 'value' => '', ]], - ['fieldset' => ['class' => 'mb-3 form-group']], + ['fieldset' => ['class' => 'mb-3']], ['legend' => ['class' => 'col-form-label pt-0']], 'group 1', '/legend', @@ -1829,7 +1829,7 @@ public function testHorizontalAlignMultipleCheckboxControlOptionGroups() '/label', '/div', '/fieldset', - ['fieldset' => ['class' => 'mb-3 form-group']], + ['fieldset' => ['class' => 'mb-3']], ['legend' => ['class' => 'col-form-label pt-0']], 'group 2', '/legend', @@ -1891,7 +1891,7 @@ public function testHorizontalAlignMultipleCheckboxControlOptionGroupsWithCustom ]); $expected = [ ['div' => [ - 'class' => 'custom-spacing form-group row multicheckbox', + 'class' => 'custom-spacing row multicheckbox', 'role' => 'group', 'aria-labelledby' => 'users-group-label', ]], @@ -1905,7 +1905,7 @@ public function testHorizontalAlignMultipleCheckboxControlOptionGroupsWithCustom 'name' => 'users', 'value' => '', ]], - ['fieldset' => ['class' => 'custom-spacing form-group']], + ['fieldset' => ['class' => 'custom-spacing']], ['legend' => ['class' => 'col-form-label pt-0']], 'group 1', '/legend', @@ -1934,7 +1934,7 @@ public function testHorizontalAlignMultipleCheckboxControlOptionGroupsWithCustom '/label', '/div', '/fieldset', - ['fieldset' => ['class' => 'custom-spacing form-group']], + ['fieldset' => ['class' => 'custom-spacing']], ['legend' => ['class' => 'col-form-label pt-0']], 'group 2', '/legend', @@ -1998,7 +1998,7 @@ public function testHorizontalAlignMultipleCheckboxControlOptionGroupsWithError( ]); $expected = [ ['div' => [ - 'class' => 'mb-3 form-group row multicheckbox is-invalid', + 'class' => 'mb-3 row multicheckbox is-invalid', 'role' => 'group', 'aria-labelledby' => 'users-group-label', ]], @@ -2013,7 +2013,7 @@ public function testHorizontalAlignMultipleCheckboxControlOptionGroupsWithError( 'name' => 'users', 'value' => '', ]], - ['fieldset' => ['class' => 'mb-3 form-group']], + ['fieldset' => ['class' => 'mb-3']], ['legend' => ['class' => 'col-form-label pt-0']], 'group 1', '/legend', @@ -2046,7 +2046,7 @@ public function testHorizontalAlignMultipleCheckboxControlOptionGroupsWithError( '/label', '/div', '/fieldset', - ['fieldset' => ['class' => 'mb-3 form-group']], + ['fieldset' => ['class' => 'mb-3']], ['legend' => ['class' => 'col-form-label pt-0']], 'group 2', '/legend', @@ -2114,7 +2114,7 @@ public function testHorizontalAlignMultipleCheckboxControlOptionGroupsNestedInpu 'nestedInput' => true, ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group row multicheckbox', 'role' => 'group', 'aria-labelledby' => 'users-group-label']], + ['div' => ['class' => 'mb-3 row multicheckbox', 'role' => 'group', 'aria-labelledby' => 'users-group-label']], ['label' => ['id' => 'users-group-label', 'class' => 'col-form-label col-sm-5 d-block pt-0']], 'Users', '/label', @@ -2125,7 +2125,7 @@ public function testHorizontalAlignMultipleCheckboxControlOptionGroupsNestedInpu 'name' => 'users', 'value' => '', ]], - ['fieldset' => ['class' => 'mb-3 form-group']], + ['fieldset' => ['class' => 'mb-3']], ['legend' => ['class' => 'col-form-label pt-0']], 'group 1', '/legend', @@ -2154,7 +2154,7 @@ public function testHorizontalAlignMultipleCheckboxControlOptionGroupsNestedInpu '/label', '/div', '/fieldset', - ['fieldset' => ['class' => 'mb-3 form-group']], + ['fieldset' => ['class' => 'mb-3']], ['legend' => ['class' => 'col-form-label pt-0']], 'group 2', '/legend', @@ -2215,7 +2215,7 @@ public function testHorizontalAlignMultipleCheckboxControlOptionGroupsInline() 'inline' => true, ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group row multicheckbox', 'role' => 'group', 'aria-labelledby' => 'users-group-label']], + ['div' => ['class' => 'mb-3 row multicheckbox', 'role' => 'group', 'aria-labelledby' => 'users-group-label']], ['label' => ['id' => 'users-group-label', 'class' => 'col-form-label col-sm-5 d-block pt-0']], 'Users', '/label', @@ -2226,7 +2226,7 @@ public function testHorizontalAlignMultipleCheckboxControlOptionGroupsInline() 'name' => 'users', 'value' => '', ]], - ['fieldset' => ['class' => 'mb-3 form-group']], + ['fieldset' => ['class' => 'mb-3']], ['legend' => ['class' => 'col-form-label pt-0']], 'group 1', '/legend', @@ -2255,7 +2255,7 @@ public function testHorizontalAlignMultipleCheckboxControlOptionGroupsInline() '/label', '/div', '/fieldset', - ['fieldset' => ['class' => 'mb-3 form-group']], + ['fieldset' => ['class' => 'mb-3']], ['legend' => ['class' => 'col-form-label pt-0']], 'group 2', '/legend', @@ -2317,7 +2317,7 @@ public function testHorizontalAlignMultipleCheckboxControlOptionGroupsInlineNest 'nestedInput' => true, ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group row multicheckbox', 'role' => 'group', 'aria-labelledby' => 'users-group-label']], + ['div' => ['class' => 'mb-3 row multicheckbox', 'role' => 'group', 'aria-labelledby' => 'users-group-label']], ['label' => ['id' => 'users-group-label', 'class' => 'col-form-label col-sm-5 d-block pt-0']], 'Users', '/label', @@ -2328,7 +2328,7 @@ public function testHorizontalAlignMultipleCheckboxControlOptionGroupsInlineNest 'name' => 'users', 'value' => '', ]], - ['fieldset' => ['class' => 'mb-3 form-group']], + ['fieldset' => ['class' => 'mb-3']], ['legend' => ['class' => 'col-form-label pt-0']], 'group 1', '/legend', @@ -2357,7 +2357,7 @@ public function testHorizontalAlignMultipleCheckboxControlOptionGroupsInlineNest '/label', '/div', '/fieldset', - ['fieldset' => ['class' => 'mb-3 form-group']], + ['fieldset' => ['class' => 'mb-3']], ['legend' => ['class' => 'col-form-label pt-0']], 'group 2', '/legend', @@ -2415,7 +2415,7 @@ public function testHorizontalAlignMultipleCheckboxControlOptionsGroupsAndSingle ], ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group row multicheckbox', 'role' => 'group', 'aria-labelledby' => 'users-group-label']], + ['div' => ['class' => 'mb-3 row multicheckbox', 'role' => 'group', 'aria-labelledby' => 'users-group-label']], ['label' => ['id' => 'users-group-label', 'class' => 'col-form-label col-sm-5 d-block pt-0']], 'Users', '/label', @@ -2450,7 +2450,7 @@ public function testHorizontalAlignMultipleCheckboxControlOptionsGroupsAndSingle 'option 2', '/label', '/div', - ['fieldset' => ['class' => 'mb-3 form-group']], + ['fieldset' => ['class' => 'mb-3']], ['legend' => ['class' => 'col-form-label pt-0']], 'group', '/legend', @@ -2532,7 +2532,7 @@ public function testHorizontalAlignMultipleCheckboxControlOptionsGroupsAndSingle ], ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group row multicheckbox', 'role' => 'group', 'aria-labelledby' => 'users-group-label']], + ['div' => ['class' => 'mb-3 row multicheckbox', 'role' => 'group', 'aria-labelledby' => 'users-group-label']], ['label' => ['id' => 'users-group-label', 'class' => 'col-form-label col-sm-5 d-block pt-0']], 'Users', '/label', @@ -2579,7 +2579,7 @@ public function testHorizontalAlignMultipleCheckboxControlOptionsGroupsAndSingle 'option 3', '/label', '/div', - ['fieldset' => ['class' => 'mb-3 form-group']], + ['fieldset' => ['class' => 'mb-3']], ['legend' => ['class' => 'col-form-label pt-0']], 'group', '/legend', @@ -2659,7 +2659,7 @@ public function testHorizontalAlignMultipleCheckboxControlOptionsGroupsAndSingle 'nestedInput' => true, ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group row multicheckbox', 'role' => 'group', 'aria-labelledby' => 'users-group-label']], + ['div' => ['class' => 'mb-3 row multicheckbox', 'role' => 'group', 'aria-labelledby' => 'users-group-label']], ['label' => ['id' => 'users-group-label', 'class' => 'col-form-label col-sm-5 d-block pt-0']], 'Users', '/label', @@ -2694,7 +2694,7 @@ public function testHorizontalAlignMultipleCheckboxControlOptionsGroupsAndSingle 'option 2', '/label', '/div', - ['fieldset' => ['class' => 'mb-3 form-group']], + ['fieldset' => ['class' => 'mb-3']], ['legend' => ['class' => 'col-form-label pt-0']], 'group', '/legend', @@ -2777,7 +2777,7 @@ public function testHorizontalAlignMultipleCheckboxControlOptionsGroupsAndSingle 'nestedInput' => true, ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group row multicheckbox', 'role' => 'group', 'aria-labelledby' => 'users-group-label']], + ['div' => ['class' => 'mb-3 row multicheckbox', 'role' => 'group', 'aria-labelledby' => 'users-group-label']], ['label' => ['id' => 'users-group-label', 'class' => 'col-form-label col-sm-5 d-block pt-0']], 'Users', '/label', @@ -2824,7 +2824,7 @@ public function testHorizontalAlignMultipleCheckboxControlOptionsGroupsAndSingle 'option 3', '/label', '/div', - ['fieldset' => ['class' => 'mb-3 form-group']], + ['fieldset' => ['class' => 'mb-3']], ['legend' => ['class' => 'col-form-label pt-0']], 'group', '/legend', @@ -2900,7 +2900,7 @@ public function testHorizontalAlignMultipleCheckboxControlSwitch() ], ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group row multicheckbox', 'role' => 'group', 'aria-labelledby' => 'users-group-label']], + ['div' => ['class' => 'mb-3 row multicheckbox', 'role' => 'group', 'aria-labelledby' => 'users-group-label']], ['label' => ['id' => 'users-group-label', 'class' => 'col-form-label col-sm-5 d-block pt-0']], 'Users', '/label', diff --git a/tests/TestCase/View/Helper/FormHelper/HorizontalAlign/RadioControlTest.php b/tests/TestCase/View/Helper/FormHelper/HorizontalAlign/RadioControlTest.php index 41c4b0f4..6107a543 100644 --- a/tests/TestCase/View/Helper/FormHelper/HorizontalAlign/RadioControlTest.php +++ b/tests/TestCase/View/Helper/FormHelper/HorizontalAlign/RadioControlTest.php @@ -27,7 +27,7 @@ public function testHorizontalAlignRadioControl() ], ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group row radio', 'role' => 'group', 'aria-labelledby' => 'users-group-label']], + ['div' => ['class' => 'mb-3 row radio', 'role' => 'group', 'aria-labelledby' => 'users-group-label']], ['label' => ['id' => 'users-group-label', 'class' => 'col-form-label col-sm-5 d-block pt-0']], 'Users', '/label', @@ -88,7 +88,7 @@ public function testHorizontalAlignRadioControlWithDisabledLabel() 'label' => false, ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group row radio', 'role' => 'group', 'aria-labelledby' => 'users-group-label']], + ['div' => ['class' => 'mb-3 row radio', 'role' => 'group', 'aria-labelledby' => 'users-group-label']], ['div' => ['class' => 'col-sm-7']], ['input' => [ 'type' => 'hidden', @@ -146,7 +146,7 @@ public function testHorizontalAlignRadioControlWithCustomLabel() 'label' => 'Custom Label', ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group row radio', 'role' => 'group', 'aria-labelledby' => 'users-group-label']], + ['div' => ['class' => 'mb-3 row radio', 'role' => 'group', 'aria-labelledby' => 'users-group-label']], ['label' => ['id' => 'users-group-label', 'class' => 'col-form-label col-sm-5 d-block pt-0']], 'Custom Label', '/label', @@ -211,7 +211,7 @@ public function testHorizontalAlignRadioControlWithCustomLabelOptions() ], ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group row radio', 'role' => 'group', 'aria-labelledby' => 'users-group-label']], + ['div' => ['class' => 'mb-3 row radio', 'role' => 'group', 'aria-labelledby' => 'users-group-label']], ['label' => ['id' => 'users-group-label', 'class' => 'custom-label-class col-form-label col-sm-5 d-block pt-0', 'foo' => 'bar']], 'Custom Label', '/label', @@ -272,7 +272,7 @@ public function testHorizontalAlignRadioControlWithHelp() 'help' => 'Help text', ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group row radio', 'role' => 'group', 'aria-labelledby' => 'users-group-label']], + ['div' => ['class' => 'mb-3 row radio', 'role' => 'group', 'aria-labelledby' => 'users-group-label']], ['label' => ['id' => 'users-group-label', 'class' => 'col-form-label col-sm-5 d-block pt-0']], 'Users', '/label', @@ -343,7 +343,7 @@ public function testHorizontalAlignRadioControlWithHelpOptions() ], ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group row radio', 'role' => 'group', 'aria-labelledby' => 'users-group-label']], + ['div' => ['class' => 'mb-3 row radio', 'role' => 'group', 'aria-labelledby' => 'users-group-label']], ['label' => ['id' => 'users-group-label', 'class' => 'col-form-label col-sm-5 d-block pt-0']], 'Users', '/label', @@ -409,7 +409,7 @@ public function testHorizontalAlignRadioControlWithTooltip() 'tooltip' => 'Tooltip text', ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group row radio', 'role' => 'group', 'aria-labelledby' => 'users-group-label']], + ['div' => ['class' => 'mb-3 row radio', 'role' => 'group', 'aria-labelledby' => 'users-group-label']], ['label' => ['id' => 'users-group-label', 'class' => 'col-form-label col-sm-5 d-block pt-0']], 'Users ' , 'span' => [ @@ -450,7 +450,7 @@ public function testHorizontalAlignRadioControlWithCustomSpacing() ]); $expected = [ ['div' => [ - 'class' => 'custom-spacing form-group row radio', + 'class' => 'custom-spacing row radio', 'role' => 'group', 'aria-labelledby' => 'users-group-label', ]], @@ -493,7 +493,7 @@ public function testHorizontalAlignRadioControlWithError() ]); $expected = [ ['div' => [ - 'class' => 'mb-3 form-group row radio is-invalid', + 'class' => 'mb-3 row radio is-invalid', 'role' => 'group', 'aria-labelledby' => 'users-group-label', ]], @@ -571,7 +571,7 @@ public function testHorizontalAlignRadioControlWithErrorAndHelp() ]); $expected = [ ['div' => [ - 'class' => 'mb-3 form-group row radio is-invalid', + 'class' => 'mb-3 row radio is-invalid', 'role' => 'group', 'aria-labelledby' => 'users-group-label', ]], @@ -655,7 +655,7 @@ public function testHorizontalAlignRadioControlWithErrorAndHelpOptions() ]); $expected = [ ['div' => [ - 'class' => 'mb-3 form-group row radio is-invalid', + 'class' => 'mb-3 row radio is-invalid', 'role' => 'group', 'aria-labelledby' => 'users-group-label', ]], @@ -739,7 +739,7 @@ public function testHorizontalAlignRadioControlContainerOptions() $expected = [ ['div' => [ 'attribute' => 'container-attribute', - 'class' => 'container-class mb-3 form-group row radio', + 'class' => 'container-class mb-3 row radio', 'role' => 'group', 'aria-labelledby' => 'users-group-label', ]], @@ -811,7 +811,7 @@ public function testHorizontalAlignRadioControlContainerOptionsWithError() $expected = [ ['div' => [ 'attribute' => 'container-attribute', - 'class' => 'container-class mb-3 form-group row radio is-invalid', + 'class' => 'container-class mb-3 row radio is-invalid', 'role' => 'group', 'aria-labelledby' => 'users-group-label', ]], @@ -885,7 +885,7 @@ public function testHorizontalAlignRadioControlNestedInput() 'nestedInput' => true, ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group row radio', 'role' => 'group', 'aria-labelledby' => 'users-group-label']], + ['div' => ['class' => 'mb-3 row radio', 'role' => 'group', 'aria-labelledby' => 'users-group-label']], ['label' => ['id' => 'users-group-label', 'class' => 'col-form-label col-sm-5 d-block pt-0']], 'Users', '/label', @@ -950,7 +950,7 @@ public function testHorizontalAlignRadioControlNestedInputWithError() ]); $expected = [ ['div' => [ - 'class' => 'mb-3 form-group row radio is-invalid', + 'class' => 'mb-3 row radio is-invalid', 'role' => 'group', 'aria-labelledby' => 'users-group-label', ]], @@ -1024,7 +1024,7 @@ public function testHorizontalAlignRadioControlInline() 'inline' => true, ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group row radio', 'role' => 'group', 'aria-labelledby' => 'users-group-label']], + ['div' => ['class' => 'mb-3 row radio', 'role' => 'group', 'aria-labelledby' => 'users-group-label']], ['label' => ['id' => 'users-group-label', 'class' => 'col-form-label col-sm-5 d-block pt-0']], 'Users', '/label', @@ -1086,7 +1086,7 @@ public function testHorizontalAlignRadioControlInlineWithDisabledLabel() 'label' => false, ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group row radio', 'role' => 'group', 'aria-labelledby' => 'users-group-label']], + ['div' => ['class' => 'mb-3 row radio', 'role' => 'group', 'aria-labelledby' => 'users-group-label']], ['div' => ['class' => 'col-sm-7']], ['input' => [ 'type' => 'hidden', @@ -1145,7 +1145,7 @@ public function testHorizontalAlignRadioControlInlineWithCustomLabel() 'label' => 'Custom Label', ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group row radio', 'role' => 'group', 'aria-labelledby' => 'users-group-label']], + ['div' => ['class' => 'mb-3 row radio', 'role' => 'group', 'aria-labelledby' => 'users-group-label']], ['label' => ['id' => 'users-group-label', 'class' => 'col-form-label col-sm-5 d-block pt-0']], 'Custom Label', '/label', @@ -1211,7 +1211,7 @@ public function testHorizontalAlignRadioControlInlineWithCustomLabelOptions() ], ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group row radio', 'role' => 'group', 'aria-labelledby' => 'users-group-label']], + ['div' => ['class' => 'mb-3 row radio', 'role' => 'group', 'aria-labelledby' => 'users-group-label']], ['label' => ['id' => 'users-group-label', 'class' => 'custom-label-class col-form-label col-sm-5 d-block pt-0', 'foo' => 'bar']], 'Custom Label', '/label', @@ -1273,7 +1273,7 @@ public function testHorizontalAlignRadioControlInlineWithHelp() 'help' => 'Help text', ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group row radio', 'role' => 'group', 'aria-labelledby' => 'users-group-label']], + ['div' => ['class' => 'mb-3 row radio', 'role' => 'group', 'aria-labelledby' => 'users-group-label']], ['label' => ['id' => 'users-group-label', 'class' => 'col-form-label col-sm-5 d-block pt-0']], 'Users', '/label', @@ -1345,7 +1345,7 @@ public function testHorizontalAlignRadioControlInlineWithHelpOptions() ], ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group row radio', 'role' => 'group', 'aria-labelledby' => 'users-group-label']], + ['div' => ['class' => 'mb-3 row radio', 'role' => 'group', 'aria-labelledby' => 'users-group-label']], ['label' => ['id' => 'users-group-label', 'class' => 'col-form-label col-sm-5 d-block pt-0']], 'Users', '/label', @@ -1412,7 +1412,7 @@ public function testHorizontalAlignRadioControlInlineWithTooltip() 'tooltip' => 'Tooltip text', ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group row radio', 'role' => 'group', 'aria-labelledby' => 'users-group-label']], + ['div' => ['class' => 'mb-3 row radio', 'role' => 'group', 'aria-labelledby' => 'users-group-label']], ['label' => ['id' => 'users-group-label', 'class' => 'col-form-label col-sm-5 d-block pt-0']], 'Users ' , 'span' => [ @@ -1459,7 +1459,7 @@ public function testHorizontalAlignRadioControlInlineWithError() ]); $expected = [ ['div' => [ - 'class' => 'mb-3 form-group row radio is-invalid', + 'class' => 'mb-3 row radio is-invalid', 'role' => 'group', 'aria-labelledby' => 'users-group-label', ]], @@ -1539,7 +1539,7 @@ public function testHorizontalAlignRadioControlInlineContainerOptions() $expected = [ ['div' => [ 'attribute' => 'container-attribute', - 'class' => 'container-class mb-3 form-group row radio', + 'class' => 'container-class mb-3 row radio', 'role' => 'group', 'aria-labelledby' => 'users-group-label', ]], @@ -1612,7 +1612,7 @@ public function testHorizontalAlignRadioControlInlineContainerOptionsWithError() $expected = [ ['div' => [ 'attribute' => 'container-attribute', - 'class' => 'container-class mb-3 form-group row radio is-invalid', + 'class' => 'container-class mb-3 row radio is-invalid', 'role' => 'group', 'aria-labelledby' => 'users-group-label', ]], @@ -1687,7 +1687,7 @@ public function testHorizontalAlignRadioControlInlineNestedInput() 'nestedInput' => true, ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group row radio', 'role' => 'group', 'aria-labelledby' => 'users-group-label']], + ['div' => ['class' => 'mb-3 row radio', 'role' => 'group', 'aria-labelledby' => 'users-group-label']], ['label' => ['id' => 'users-group-label', 'class' => 'col-form-label col-sm-5 d-block pt-0']], 'Users', '/label', @@ -1753,7 +1753,7 @@ public function testHorizontalAlignRadioControlInlineNestedInputWithError() ]); $expected = [ ['div' => [ - 'class' => 'mb-3 form-group row radio is-invalid', + 'class' => 'mb-3 row radio is-invalid', 'role' => 'group', 'aria-labelledby' => 'users-group-label', ]], @@ -1834,7 +1834,7 @@ public function testHorizontalAlignRadioControlPerOptionConfiguration() ], ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group row radio', 'role' => 'group', 'aria-labelledby' => 'users-group-label']], + ['div' => ['class' => 'mb-3 row radio', 'role' => 'group', 'aria-labelledby' => 'users-group-label']], ['label' => ['id' => 'users-group-label', 'class' => 'col-form-label col-sm-5 d-block pt-0']], 'Users', '/label', @@ -1915,7 +1915,7 @@ public function testHorizontalAlignRadioControlPerOptionConfigurationInline() 'inline' => true, ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group row radio', 'role' => 'group', 'aria-labelledby' => 'users-group-label']], + ['div' => ['class' => 'mb-3 row radio', 'role' => 'group', 'aria-labelledby' => 'users-group-label']], ['label' => ['id' => 'users-group-label', 'class' => 'col-form-label col-sm-5 d-block pt-0']], 'Users', '/label', @@ -1997,7 +1997,7 @@ public function testHorizontalAlignRadioControlPerOptionConfigurationInlineNeste 'nestedInput' => true, ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group row radio', 'role' => 'group', 'aria-labelledby' => 'users-group-label']], + ['div' => ['class' => 'mb-3 row radio', 'role' => 'group', 'aria-labelledby' => 'users-group-label']], ['label' => ['id' => 'users-group-label', 'class' => 'col-form-label col-sm-5 d-block pt-0']], 'Users', '/label', diff --git a/tests/TestCase/View/Helper/FormHelper/HorizontalAlign/RangeControlTest.php b/tests/TestCase/View/Helper/FormHelper/HorizontalAlign/RangeControlTest.php index 31f96fd5..fafc2d3a 100644 --- a/tests/TestCase/View/Helper/FormHelper/HorizontalAlign/RangeControlTest.php +++ b/tests/TestCase/View/Helper/FormHelper/HorizontalAlign/RangeControlTest.php @@ -26,7 +26,7 @@ public function testHorizontalAlignRangeControl() 'step' => 1, ]); $expected = [ - 'div' => ['class' => 'mb-3 form-group row range'], + 'div' => ['class' => 'mb-3 row range'], ['label' => ['class' => 'col-form-label col-sm-5 pt-0', 'for' => 'height']], 'Height', '/label', @@ -65,7 +65,7 @@ public function testHorizontalAlignRangeControlWithDisabledLabel() 'label' => false, ]); $expected = [ - 'div' => ['class' => 'mb-3 form-group row range'], + 'div' => ['class' => 'mb-3 row range'], ['div' => ['class' => 'col-sm-7']], 'input' => [ 'type' => 'range', @@ -101,7 +101,7 @@ public function testHorizontalAlignRangeControlWithCustomLabel() 'label' => 'Custom Label', ]); $expected = [ - 'div' => ['class' => 'mb-3 form-group row range'], + 'div' => ['class' => 'mb-3 row range'], ['label' => ['class' => 'col-form-label col-sm-5 pt-0', 'for' => 'height']], 'Custom Label', '/label', @@ -144,7 +144,7 @@ public function testHorizontalAlignRangeControlWithCustomLabelOptions() ], ]); $expected = [ - 'div' => ['class' => 'mb-3 form-group row range'], + 'div' => ['class' => 'mb-3 row range'], ['label' => [ 'class' => 'custom-label-class col-form-label col-sm-5 pt-0', 'foo' => 'bar', @@ -187,7 +187,7 @@ public function testHorizontalAlignRangeControlWithHelp() 'help' => 'Help text', ]); $expected = [ - 'div' => ['class' => 'mb-3 form-group row range'], + 'div' => ['class' => 'mb-3 row range'], ['label' => ['class' => 'col-form-label col-sm-5 pt-0', 'for' => 'height']], 'Height', '/label', @@ -235,7 +235,7 @@ public function testHorizontalAlignRangeControlWithHelpOptions() ], ]); $expected = [ - 'div' => ['class' => 'mb-3 form-group row range'], + 'div' => ['class' => 'mb-3 row range'], ['label' => ['class' => 'col-form-label col-sm-5 pt-0', 'for' => 'height']], 'Height', '/label', @@ -282,7 +282,7 @@ public function testHorizontalAlignRangeControlWithTooltip() 'tooltip' => 'Tooltip text', ]); $expected = [ - 'div' => ['class' => 'mb-3 form-group row range'], + 'div' => ['class' => 'mb-3 row range'], ['label' => ['class' => 'col-form-label col-sm-5 pt-0', 'for' => 'height']], 'Height', 'span' => [ @@ -327,7 +327,7 @@ public function testHorizontalAlignRangeControlWithCustomSpacing() 'spacing' => 'custom-spacing', ]); $expected = [ - 'div' => ['class' => 'custom-spacing form-group row range'], + 'div' => ['class' => 'custom-spacing row range'], ['label' => ['class' => 'col-form-label col-sm-5 pt-0', 'for' => 'height']], 'Height', '/label', @@ -368,7 +368,7 @@ public function testHorizontalAlignRangeControlWithError() 'step' => 1, ]); $expected = [ - 'div' => ['class' => 'mb-3 form-group row range is-invalid'], + 'div' => ['class' => 'mb-3 row range is-invalid'], ['label' => ['class' => 'col-form-label col-sm-5 pt-0', 'for' => 'height']], 'Height', '/label', @@ -415,7 +415,7 @@ public function testHorizontalAlignRangeControlWithErrorAndHelp() 'help' => 'Help text', ]); $expected = [ - 'div' => ['class' => 'mb-3 form-group row range is-invalid'], + 'div' => ['class' => 'mb-3 row range is-invalid'], ['label' => ['class' => 'col-form-label col-sm-5 pt-0', 'for' => 'height']], 'Height', '/label', @@ -470,7 +470,7 @@ public function testHorizontalAlignRangeControlWithErrorAndHelpOptions() ], ]); $expected = [ - 'div' => ['class' => 'mb-3 form-group row range is-invalid'], + 'div' => ['class' => 'mb-3 row range is-invalid'], ['label' => ['class' => 'col-form-label col-sm-5 pt-0', 'for' => 'height']], 'Height', '/label', @@ -526,7 +526,7 @@ public function testHorizontalAlignRangeControlContainerOptions() $expected = [ 'div' => [ 'attribute' => 'container-attribute', - 'class' => 'container-class mb-3 form-group row range', + 'class' => 'container-class mb-3 row range', ], ['label' => ['class' => 'col-form-label col-sm-5 pt-0', 'for' => 'height']], 'Height', @@ -574,7 +574,7 @@ public function testHorizontalAlignRangeControlContainerOptionsWithError() $expected = [ 'div' => [ 'attribute' => 'container-attribute', - 'class' => 'container-class mb-3 form-group row range is-invalid', + 'class' => 'container-class mb-3 row range is-invalid', ], ['label' => ['class' => 'col-form-label col-sm-5 pt-0', 'for' => 'height']], 'Height', diff --git a/tests/TestCase/View/Helper/FormHelper/HorizontalAlign/SelectControlTest.php b/tests/TestCase/View/Helper/FormHelper/HorizontalAlign/SelectControlTest.php index 741a946b..69e26e65 100644 --- a/tests/TestCase/View/Helper/FormHelper/HorizontalAlign/SelectControlTest.php +++ b/tests/TestCase/View/Helper/FormHelper/HorizontalAlign/SelectControlTest.php @@ -27,7 +27,7 @@ public function testHorizontalAlignSelectControl() ], ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group row select']], + ['div' => ['class' => 'mb-3 row select']], ['label' => ['class' => 'col-form-label col-sm-5', 'for' => 'users']], 'Users', '/label', @@ -68,7 +68,7 @@ public function testHorizontalAlignSelectControlWithFloatingLabel() ], ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group row select']], + ['div' => ['class' => 'mb-3 row select']], ['div' => ['class' => 'offset-sm-5 col-sm-7 form-floating']], ['select' => ['name' => 'users', 'id' => 'users', 'class' => 'form-select']], ['option' => ['value' => '1']], @@ -107,7 +107,7 @@ public function testHorizontalAlignSelectControlWithDisabledLabel() 'label' => false, ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group row select']], + ['div' => ['class' => 'mb-3 row select']], ['div' => ['class' => 'col-sm-7']], ['select' => ['name' => 'users', 'id' => 'users', 'class' => 'form-select']], ['option' => ['value' => '1']], @@ -143,7 +143,7 @@ public function testHorizontalAlignSelectControlWithCustomLabel() 'label' => 'Custom Label', ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group row select']], + ['div' => ['class' => 'mb-3 row select']], ['label' => ['class' => 'col-form-label col-sm-5', 'for' => 'users']], 'Custom Label', '/label', @@ -186,7 +186,7 @@ public function testHorizontalAlignSelectControlWithCustomLabelOptions() ], ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group row select']], + ['div' => ['class' => 'mb-3 row select']], ['label' => [ 'class' => 'custom-label-class col-form-label col-sm-5', 'foo' => 'bar', @@ -229,7 +229,7 @@ public function testHorizontalAlignSelectControlWithHelp() 'help' => 'Help text', ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group row select']], + ['div' => ['class' => 'mb-3 row select']], ['label' => ['class' => 'col-form-label col-sm-5', 'for' => 'users']], 'Users', '/label', @@ -281,7 +281,7 @@ public function testHorizontalAlignSelectControlWithHelpOptions() ], ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group row select']], + ['div' => ['class' => 'mb-3 row select']], ['label' => ['class' => 'col-form-label col-sm-5', 'for' => 'users']], 'Users', '/label', @@ -332,7 +332,7 @@ public function testHorizontalAlignSelectControlWithTooltip() 'tooltip' => 'Tooltip text', ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group row select']], + ['div' => ['class' => 'mb-3 row select']], ['label' => ['class' => 'col-form-label col-sm-5', 'for' => 'users']], 'Users', 'span' => [ @@ -377,7 +377,7 @@ public function testHorizontalAlignSelectControlWithCustomSpacing() 'spacing' => 'custom-spacing', ]); $expected = [ - ['div' => ['class' => 'custom-spacing form-group row select']], + ['div' => ['class' => 'custom-spacing row select']], ['label' => ['class' => 'col-form-label col-sm-5', 'for' => 'users']], 'Users', '/label', @@ -418,7 +418,7 @@ public function testHorizontalAlignSelectControlWithError() ], ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group row select is-invalid']], + ['div' => ['class' => 'mb-3 row select is-invalid']], ['label' => ['class' => 'col-form-label col-sm-5', 'for' => 'users']], 'Users', '/label', @@ -469,7 +469,7 @@ public function testHorizontalAlignSelectControlWithErrorAndHelp() 'help' => 'Help text', ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group row select is-invalid']], + ['div' => ['class' => 'mb-3 row select is-invalid']], ['label' => ['class' => 'col-form-label col-sm-5', 'for' => 'users']], 'Users', '/label', @@ -528,7 +528,7 @@ public function testHorizontalAlignSelectControlWithErrorAndHelpOptions() ], ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group row select is-invalid']], + ['div' => ['class' => 'mb-3 row select is-invalid']], ['label' => ['class' => 'col-form-label col-sm-5', 'for' => 'users']], 'Users', '/label', @@ -588,7 +588,7 @@ public function testHorizontalAlignSelectControlContainerOptions() $expected = [ ['div' => [ 'attribute' => 'container-attribute', - 'class' => 'container-class mb-3 form-group row select', + 'class' => 'container-class mb-3 row select', ]], ['label' => ['class' => 'col-form-label col-sm-5', 'for' => 'users']], 'Users', @@ -636,7 +636,7 @@ public function testHorizontalAlignSelectControlContainerOptionsWithError() $expected = [ ['div' => [ 'attribute' => 'container-attribute', - 'class' => 'container-class mb-3 form-group row select is-invalid', + 'class' => 'container-class mb-3 row select is-invalid', ]], ['label' => ['class' => 'col-form-label col-sm-5', 'for' => 'users']], 'Users', @@ -685,7 +685,7 @@ public function testHorizontalAlignSelectControlInputGroupAppend() 'append' => 'append', ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group row select']], + ['div' => ['class' => 'mb-3 row select']], ['label' => ['class' => 'col-form-label col-sm-5', 'for' => 'users']], 'Users', '/label', @@ -729,7 +729,7 @@ public function testHorizontalAlignSelectControlInputGroupPrepend() 'prepend' => 'prepend', ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group row select']], + ['div' => ['class' => 'mb-3 row select']], ['label' => ['class' => 'col-form-label col-sm-5', 'for' => 'users']], 'Users', '/label', diff --git a/tests/TestCase/View/Helper/FormHelper/HorizontalAlign/StaticControlTest.php b/tests/TestCase/View/Helper/FormHelper/HorizontalAlign/StaticControlTest.php index b52395dc..883b7a12 100644 --- a/tests/TestCase/View/Helper/FormHelper/HorizontalAlign/StaticControlTest.php +++ b/tests/TestCase/View/Helper/FormHelper/HorizontalAlign/StaticControlTest.php @@ -25,7 +25,7 @@ public function testHorizontalAlignStaticControl() $result = $this->Form->control('title', ['type' => 'staticControl']); $expected = [ - 'div' => ['class' => 'mb-3 form-group row staticControl'], + 'div' => ['class' => 'mb-3 row staticControl'], 'label' => ['class' => 'col-form-label col-sm-5', 'for' => 'title'], 'Title', '/label', @@ -68,7 +68,7 @@ public function testHorizontalAlignStaticControlWithoutHiddenField() 'escape' => false, ]); $expected = [ - 'div' => ['class' => 'mb-3 form-group row staticControl'], + 'div' => ['class' => 'mb-3 row staticControl'], 'label' => ['class' => 'col-form-label col-sm-5', 'for' => 'title'], 'Title', '/label', @@ -103,7 +103,7 @@ public function testHorizontalAlignStaticControlWithDisabledLabel() 'label' => false, ]); $expected = [ - 'div' => ['class' => 'mb-3 form-group row staticControl'], + 'div' => ['class' => 'mb-3 row staticControl'], ['div' => ['class' => 'col-sm-7']], 'p' => ['class' => 'form-control-plaintext'], 'title', @@ -138,7 +138,7 @@ public function testHorizontalAlignStaticControlWithCustomLabel() 'label' => 'Custom Label', ]); $expected = [ - 'div' => ['class' => 'mb-3 form-group row staticControl'], + 'div' => ['class' => 'mb-3 row staticControl'], 'label' => ['class' => 'col-form-label col-sm-5', 'for' => 'title'], 'Custom Label', '/label', @@ -180,7 +180,7 @@ public function testHorizontalAlignStaticControlWithCustomLabelOptions() ], ]); $expected = [ - 'div' => ['class' => 'mb-3 form-group row staticControl'], + 'div' => ['class' => 'mb-3 row staticControl'], 'label' => ['class' => 'custom-label-class col-form-label col-sm-5', 'foo' => 'bar', 'for' => 'title'], 'Custom Label', '/label', @@ -218,7 +218,7 @@ public function testHorizontalAlignStaticControlWithHelp() 'help' => 'Help text', ]); $expected = [ - 'div' => ['class' => 'mb-3 form-group row staticControl'], + 'div' => ['class' => 'mb-3 row staticControl'], 'label' => ['class' => 'col-form-label col-sm-5', 'for' => 'title'], 'Title', '/label', @@ -265,7 +265,7 @@ public function testHorizontalAlignStaticControlWithHelpOptions() ], ]); $expected = [ - 'div' => ['class' => 'mb-3 form-group row staticControl'], + 'div' => ['class' => 'mb-3 row staticControl'], 'label' => ['class' => 'col-form-label col-sm-5', 'for' => 'title'], 'Title', '/label', @@ -311,7 +311,7 @@ public function testHorizontalAlignStaticControlWithTooltip() 'tooltip' => 'Tooltip text', ]); $expected = [ - 'div' => ['class' => 'mb-3 form-group row staticControl'], + 'div' => ['class' => 'mb-3 row staticControl'], 'label' => ['class' => 'col-form-label col-sm-5', 'for' => 'title'], 'Title', 'span' => [ @@ -355,7 +355,7 @@ public function testHorizontalAlignStaticControlWithCustomSpacing() 'spacing' => 'custom-spacing', ]); $expected = [ - 'div' => ['class' => 'custom-spacing form-group row staticControl'], + 'div' => ['class' => 'custom-spacing row staticControl'], 'label' => ['class' => 'col-form-label col-sm-5', 'for' => 'title'], 'Title', '/label', @@ -395,7 +395,7 @@ public function testHorizontalAlignStaticControlWithError() 'type' => 'staticControl', ]); $expected = [ - 'div' => ['class' => 'mb-3 form-group row staticControl is-invalid'], + 'div' => ['class' => 'mb-3 row staticControl is-invalid'], 'label' => ['class' => 'col-form-label col-sm-5', 'for' => 'title'], 'Title', '/label', @@ -443,7 +443,7 @@ public function testHorizontalAlignStaticControlWithErrorAndHelp() 'help' => 'Help text', ]); $expected = [ - 'div' => ['class' => 'mb-3 form-group row staticControl is-invalid'], + 'div' => ['class' => 'mb-3 row staticControl is-invalid'], 'label' => ['class' => 'col-form-label col-sm-5', 'for' => 'title'], 'Title', '/label', @@ -498,7 +498,7 @@ public function testHorizontalAlignStaticControlWithErrorAndHelpOptions() ], ]); $expected = [ - 'div' => ['class' => 'mb-3 form-group row staticControl is-invalid'], + 'div' => ['class' => 'mb-3 row staticControl is-invalid'], 'label' => ['class' => 'col-form-label col-sm-5', 'for' => 'title'], 'Title', '/label', @@ -554,7 +554,7 @@ public function testHorizontalAlignStaticControlContainerOptions() $expected = [ 'div' => [ 'attribute' => 'container-attribute', - 'class' => 'container-class mb-3 form-group row staticControl', + 'class' => 'container-class mb-3 row staticControl', ], 'label' => ['class' => 'col-form-label col-sm-5', 'for' => 'title'], 'Title', @@ -601,7 +601,7 @@ public function testHorizontalAlignStaticControlContainerOptionsWithError() $expected = [ 'div' => [ 'attribute' => 'container-attribute', - 'class' => 'container-class mb-3 form-group row staticControl is-invalid', + 'class' => 'container-class mb-3 row staticControl is-invalid', ], 'label' => ['class' => 'col-form-label col-sm-5', 'for' => 'title'], 'Title', diff --git a/tests/TestCase/View/Helper/FormHelper/HorizontalAlign/SubmitControlTest.php b/tests/TestCase/View/Helper/FormHelper/HorizontalAlign/SubmitControlTest.php index 8e645f42..6a8ed1fa 100644 --- a/tests/TestCase/View/Helper/FormHelper/HorizontalAlign/SubmitControlTest.php +++ b/tests/TestCase/View/Helper/FormHelper/HorizontalAlign/SubmitControlTest.php @@ -21,7 +21,7 @@ public function testHorizontalAlignSubmit() $result = $this->Form->submit('Submit'); $expected = [ - 'div' => ['class' => 'form-group row'], + 'div' => ['class' => 'row'], ['div' => ['class' => 'offset-sm-5 col-sm-7']], 'input' => [ 'type' => 'submit', @@ -54,7 +54,7 @@ public function testHorizontalAlignSubmitContainerOptions() $expected = [ 'div' => [ 'attribute' => 'container-attribute', - 'class' => 'container-class form-group row', + 'class' => 'container-class row', ], ['div' => ['class' => 'offset-sm-5 col-sm-7']], 'input' => [ diff --git a/tests/TestCase/View/Helper/FormHelper/HorizontalAlign/TextControlTest.php b/tests/TestCase/View/Helper/FormHelper/HorizontalAlign/TextControlTest.php index c705441d..15aeb71a 100644 --- a/tests/TestCase/View/Helper/FormHelper/HorizontalAlign/TextControlTest.php +++ b/tests/TestCase/View/Helper/FormHelper/HorizontalAlign/TextControlTest.php @@ -22,7 +22,7 @@ public function testHorizontalAlignTextControl() $result = $this->Form->control('title'); $expected = [ - 'div' => ['class' => 'mb-3 form-group row text'], + 'div' => ['class' => 'mb-3 row text'], 'label' => ['class' => 'col-form-label col-sm-5', 'for' => 'title'], 'Title', '/label', @@ -57,7 +57,7 @@ public function testHorizontalAlignTextControlWithFloatingLabel() ], ]); $expected = [ - 'div' => ['class' => 'mb-3 form-group row text'], + 'div' => ['class' => 'mb-3 row text'], ['div' => ['class' => 'offset-sm-5 col-sm-7 form-floating']], 'input' => [ 'type' => 'text', @@ -94,7 +94,7 @@ public function testHorizontalAlignTextControlWithFloatingLabelAndCustomLabelTex ], ]); $expected = [ - 'div' => ['class' => 'mb-3 form-group row text'], + 'div' => ['class' => 'mb-3 row text'], ['div' => ['class' => 'offset-sm-5 col-sm-7 form-floating']], 'input' => [ 'type' => 'text', @@ -131,7 +131,7 @@ public function testHorizontalAlignTextControlWithFloatingLabelAndCustomPlacehol 'placeholder' => 'Custom Placeholder', ]); $expected = [ - 'div' => ['class' => 'mb-3 form-group row text'], + 'div' => ['class' => 'mb-3 row text'], ['div' => ['class' => 'offset-sm-5 col-sm-7 form-floating']], 'input' => [ 'type' => 'text', @@ -168,7 +168,7 @@ public function testHorizontalAlignTextControlWithFloatingLabelAndDisabledPlaceh 'placeholder' => false, ]); $expected = [ - 'div' => ['class' => 'mb-3 form-group row text'], + 'div' => ['class' => 'mb-3 row text'], ['div' => ['class' => 'offset-sm-5 col-sm-7 form-floating']], 'input' => [ 'type' => 'text', @@ -199,7 +199,7 @@ public function testHorizontalAlignTextControlWithDisabledLabel() $result = $this->Form->control('title', ['label' => false]); $expected = [ - 'div' => ['class' => 'mb-3 form-group row text'], + 'div' => ['class' => 'mb-3 row text'], ['div' => ['class' => 'col-sm-7']], 'input' => [ 'type' => 'text', @@ -227,7 +227,7 @@ public function testHorizontalAlignTextControlWithCustomLabel() $result = $this->Form->control('title', ['label' => 'Custom Label']); $expected = [ - 'div' => ['class' => 'mb-3 form-group row text'], + 'div' => ['class' => 'mb-3 row text'], 'label' => ['class' => 'col-form-label col-sm-5', 'for' => 'title'], 'Custom Label', '/label', @@ -264,7 +264,7 @@ public function testHorizontalAlignTextControlWithCustomLabelOptions() ], ]); $expected = [ - 'div' => ['class' => 'mb-3 form-group row text'], + 'div' => ['class' => 'mb-3 row text'], 'label' => [ 'for' => 'title', 'class' => 'custom-label-class col-form-label col-sm-5', @@ -301,7 +301,7 @@ public function testHorizontalAlignTextControlWithHelp() 'help' => 'Help text', ]); $expected = [ - 'div' => ['class' => 'mb-3 form-group row text'], + 'div' => ['class' => 'mb-3 row text'], 'label' => ['class' => 'col-form-label col-sm-5', 'for' => 'title'], 'Title', '/label', @@ -343,7 +343,7 @@ public function testHorizontalAlignTextControlWithHelpOptions() ], ]); $expected = [ - 'div' => ['class' => 'mb-3 form-group row text'], + 'div' => ['class' => 'mb-3 row text'], 'label' => ['class' => 'col-form-label col-sm-5', 'for' => 'title'], 'Title', '/label', @@ -384,7 +384,7 @@ public function testHorizontalAlignTextControlWithTooltip() 'tooltip' => 'Tooltip text', ]); $expected = [ - 'div' => ['class' => 'mb-3 form-group row text'], + 'div' => ['class' => 'mb-3 row text'], 'label' => ['class' => 'col-form-label col-sm-5', 'for' => 'title'], 'Title', 'span' => [ @@ -424,7 +424,7 @@ public function testHorizontalAlignTextControlWithError() $result = $this->Form->control('title'); $expected = [ - 'div' => ['class' => 'mb-3 form-group row text is-invalid'], + 'div' => ['class' => 'mb-3 row text is-invalid'], 'label' => ['class' => 'col-form-label col-sm-5', 'for' => 'title'], 'Title', '/label', @@ -466,7 +466,7 @@ public function testHorizontalAlignTextControlWithErrorAndHelp() 'help' => 'Help text', ]); $expected = [ - 'div' => ['class' => 'mb-3 form-group row text is-invalid'], + 'div' => ['class' => 'mb-3 row text is-invalid'], 'label' => ['class' => 'col-form-label col-sm-5', 'for' => 'title'], 'Title', '/label', @@ -515,7 +515,7 @@ public function testHorizontalAlignTextControlWithErrorAndHelpOptions() ], ]); $expected = [ - 'div' => ['class' => 'mb-3 form-group row text is-invalid'], + 'div' => ['class' => 'mb-3 row text is-invalid'], 'label' => ['class' => 'col-form-label col-sm-5', 'for' => 'title'], 'Title', '/label', @@ -566,7 +566,7 @@ public function testHorizontalAlignTextControlContainerOptions() $expected = [ 'div' => [ 'attribute' => 'container-attribute', - 'class' => 'container-class mb-3 form-group row text', + 'class' => 'container-class mb-3 row text', ], 'label' => ['class' => 'col-form-label col-sm-5', 'for' => 'title',], 'Title', @@ -609,7 +609,7 @@ public function testHorizontalAlignTextControlContainerOptionsWithError() $expected = [ 'div' => [ 'attribute' => 'container-attribute', - 'class' => 'container-class mb-3 form-group row text is-invalid', + 'class' => 'container-class mb-3 row text is-invalid', ], 'label' => ['class' => 'col-form-label col-sm-5', 'for' => 'title',], 'Title', diff --git a/tests/TestCase/View/Helper/FormHelper/InlineAlign/ColorControlTest.php b/tests/TestCase/View/Helper/FormHelper/InlineAlign/ColorControlTest.php index 14862491..602d4051 100644 --- a/tests/TestCase/View/Helper/FormHelper/InlineAlign/ColorControlTest.php +++ b/tests/TestCase/View/Helper/FormHelper/InlineAlign/ColorControlTest.php @@ -19,7 +19,7 @@ public function testInlineAlignColorControl() ]); $expected = [ ['div' => ['class' => 'col-auto']], - 'div' => ['class' => 'form-group color'], + 'div' => ['class' => 'color'], 'label' => ['class' => 'form-label visually-hidden', 'for' => 'color'], 'Color', '/label', @@ -49,7 +49,7 @@ public function testInlineAlignColorControlWithDisabledLabel() ]); $expected = [ ['div' => ['class' => 'col-auto']], - 'div' => ['class' => 'form-group color'], + 'div' => ['class' => 'color'], 'input' => [ 'type' => 'color', 'name' => 'color', @@ -76,7 +76,7 @@ public function testInlineAlignColorControlWithCustomLabel() ]); $expected = [ ['div' => ['class' => 'col-auto']], - 'div' => ['class' => 'form-group color'], + 'div' => ['class' => 'color'], 'label' => ['class' => 'form-label visually-hidden', 'for' => 'color'], 'Custom Label', '/label', @@ -110,7 +110,7 @@ public function testInlineAlignColorControlWithCustomLabelOptions() ]); $expected = [ ['div' => ['class' => 'col-auto']], - 'div' => ['class' => 'form-group color'], + 'div' => ['class' => 'color'], 'label' => [ 'class' => 'custom-label-class form-label visually-hidden', 'foo' => 'bar', @@ -144,7 +144,7 @@ public function testInlineAlignColorControlWithHelp() ]); $expected = [ ['div' => ['class' => 'col-auto']], - 'div' => ['class' => 'form-group color'], + 'div' => ['class' => 'color'], 'label' => ['class' => 'form-label visually-hidden', 'for' => 'color'], 'Color', '/label', @@ -183,7 +183,7 @@ public function testInlineAlignColorControlWithHelpOptions() ]); $expected = [ ['div' => ['class' => 'col-auto']], - 'div' => ['class' => 'form-group color'], + 'div' => ['class' => 'color'], 'label' => ['class' => 'form-label visually-hidden', 'for' => 'color'], 'Color', '/label', @@ -221,7 +221,7 @@ public function testInlineAlignColorControlWithTooltip() ]); $expected = [ ['div' => ['class' => 'col-auto']], - 'div' => ['class' => 'form-group color'], + 'div' => ['class' => 'color'], 'label' => ['class' => 'form-label visually-hidden', 'for' => 'color'], 'Color', 'span' => [ @@ -259,7 +259,7 @@ public function testInlineAlignColorControlWithError() ]); $expected = [ ['div' => ['class' => 'col-auto']], - 'div' => ['class' => 'form-group position-relative color is-invalid'], + 'div' => ['class' => 'position-relative color is-invalid'], 'label' => ['class' => 'form-label visually-hidden', 'for' => 'color'], 'Color', '/label', @@ -297,7 +297,7 @@ public function testInlineAlignColorControlWithErrorAndHelp() ]); $expected = [ ['div' => ['class' => 'col-auto']], - 'div' => ['class' => 'form-group position-relative color is-invalid'], + 'div' => ['class' => 'position-relative color is-invalid'], 'label' => ['class' => 'form-label visually-hidden', 'for' => 'color'], 'Color', '/label', @@ -343,7 +343,7 @@ public function testInlineAlignColorControlWithErrorAndHelpOptions() ]); $expected = [ ['div' => ['class' => 'col-auto']], - 'div' => ['class' => 'form-group position-relative color is-invalid'], + 'div' => ['class' => 'position-relative color is-invalid'], 'label' => ['class' => 'form-label visually-hidden', 'for' => 'color'], 'Color', '/label', @@ -391,7 +391,7 @@ public function testInlineAlignColorControlContainerOptions() ['div' => ['class' => 'col-auto']], 'div' => [ 'attribute' => 'container-attribute', - 'class' => 'container-class form-group color', + 'class' => 'container-class color', ], 'label' => ['class' => 'form-label visually-hidden', 'for' => 'color'], 'Color', @@ -431,7 +431,7 @@ public function testInlineAlignColorControlContainerOptionsWithError() ['div' => ['class' => 'col-auto']], 'div' => [ 'attribute' => 'container-attribute', - 'class' => 'container-class form-group position-relative color is-invalid', + 'class' => 'container-class position-relative color is-invalid', ], 'label' => ['class' => 'form-label visually-hidden', 'for' => 'color'], 'Color', diff --git a/tests/TestCase/View/Helper/FormHelper/InlineAlign/DateTimeControlTest.php b/tests/TestCase/View/Helper/FormHelper/InlineAlign/DateTimeControlTest.php index 8160b269..5c9dd6ed 100644 --- a/tests/TestCase/View/Helper/FormHelper/InlineAlign/DateTimeControlTest.php +++ b/tests/TestCase/View/Helper/FormHelper/InlineAlign/DateTimeControlTest.php @@ -24,7 +24,7 @@ public function testInlineAlignDateTimeControl() ]); $expected = [ ['div' => ['class' => 'col-auto']], - ['div' => ['class' => 'form-group datetime-local']], + ['div' => ['class' => 'datetime-local']], ['label' => ['class' => 'form-label visually-hidden', 'for' => 'created']], 'Created', '/label', @@ -58,7 +58,7 @@ public function testInlineAlignDateTimeControlWithDisabledLabel() ]); $expected = [ ['div' => ['class' => 'col-auto']], - ['div' => ['class' => 'form-group datetime-local']], + ['div' => ['class' => 'datetime-local']], 'input' => [ 'type' => 'datetime-local', 'name' => 'created', @@ -89,7 +89,7 @@ public function testInlineAlignDateTimeControlWithCustomLabel() ]); $expected = [ ['div' => ['class' => 'col-auto']], - ['div' => ['class' => 'form-group datetime-local']], + ['div' => ['class' => 'datetime-local']], ['label' => ['class' => 'form-label visually-hidden', 'for' => 'created']], 'Custom Label', '/label', @@ -127,7 +127,7 @@ public function testInlineAlignDateTimeControlWithCustomLabelOptions() ]); $expected = [ ['div' => ['class' => 'col-auto']], - ['div' => ['class' => 'form-group datetime-local']], + ['div' => ['class' => 'datetime-local']], ['label' => [ 'class' => 'custom-label-class form-label visually-hidden', 'foo' => 'bar', @@ -165,7 +165,7 @@ public function testInlineAlignDateTimeControlWithHelp() ]); $expected = [ ['div' => ['class' => 'col-auto']], - ['div' => ['class' => 'form-group datetime-local']], + ['div' => ['class' => 'datetime-local']], ['label' => ['class' => 'form-label visually-hidden', 'for' => 'created']], 'Created', '/label', @@ -208,7 +208,7 @@ public function testInlineAlignDateTimeControlWithHelpOptions() ]); $expected = [ ['div' => ['class' => 'col-auto']], - ['div' => ['class' => 'form-group datetime-local']], + ['div' => ['class' => 'datetime-local']], ['label' => ['class' => 'form-label visually-hidden', 'for' => 'created']], 'Created', '/label', @@ -250,7 +250,7 @@ public function testInlineAlignDateTimeControlWithTooltip() ]); $expected = [ ['div' => ['class' => 'col-auto']], - ['div' => ['class' => 'form-group datetime-local']], + ['div' => ['class' => 'datetime-local']], ['label' => ['class' => 'form-label visually-hidden', 'for' => 'created']], 'Created ', 'span' => [ @@ -293,7 +293,7 @@ public function testInlineAlignDateTimeControlWithError() $expected = [ ['div' => ['class' => 'col-auto']], ['div' => [ - 'class' => 'form-group position-relative datetime-local is-invalid', + 'class' => 'position-relative datetime-local is-invalid', ]], ['label' => ['class' => 'form-label visually-hidden', 'for' => 'created']], 'Created', @@ -338,7 +338,7 @@ public function testInlineAlignDateTimeControlContainerOptions() ['div' => ['class' => 'col-auto']], ['div' => [ 'attribute' => 'container-attribute', - 'class' => 'container-class form-group datetime-local', + 'class' => 'container-class datetime-local', ]], ['label' => ['class' => 'form-label visually-hidden', 'for' => 'created']], 'Created', @@ -377,7 +377,7 @@ public function testInlineAlignDateTimeControlWithErrorAndHelp() $expected = [ ['div' => ['class' => 'col-auto']], ['div' => [ - 'class' => 'form-group position-relative datetime-local is-invalid', + 'class' => 'position-relative datetime-local is-invalid', ]], ['label' => ['class' => 'form-label visually-hidden', 'for' => 'created']], 'Created', @@ -429,7 +429,7 @@ public function testInlineAlignDateTimeControlWithErrorAndHelpOptions() $expected = [ ['div' => ['class' => 'col-auto']], ['div' => [ - 'class' => 'form-group position-relative datetime-local is-invalid', + 'class' => 'position-relative datetime-local is-invalid', ]], ['label' => ['class' => 'form-label visually-hidden', 'for' => 'created']], 'Created', @@ -487,7 +487,7 @@ public function testInlineAlignDateTimeControlContainerOptionsWithError() ['div' => ['class' => 'col-auto']], ['div' => [ 'attribute' => 'container-attribute', - 'class' => 'container-class form-group position-relative datetime-local is-invalid', + 'class' => 'container-class position-relative datetime-local is-invalid', ]], ['label' => ['class' => 'form-label visually-hidden', 'for' => 'created']], 'Created', @@ -526,7 +526,7 @@ public function testInlineAlignDateTimeControlDate() ]); $expected = [ ['div' => ['class' => 'col-auto']], - ['div' => ['class' => 'form-group date']], + ['div' => ['class' => 'date']], ['label' => ['class' => 'form-label visually-hidden', 'for' => 'created']], 'Created', '/label', @@ -559,7 +559,7 @@ public function testInlineAlignDateTimeControlTime() ]); $expected = [ ['div' => ['class' => 'col-auto']], - ['div' => ['class' => 'form-group time']], + ['div' => ['class' => 'time']], ['label' => ['class' => 'form-label visually-hidden', 'for' => 'created']], 'Created', '/label', @@ -588,17 +588,17 @@ public function testInlineAlignDateTimeControlCustomContainerTemplateViaTemplate $result = $this->Form->control('created', [ 'type' => 'datetime', ]); - $this->assertStringContainsString('
', $result); + $this->assertStringContainsString('
', $result); $result = $this->Form->control('created', [ 'type' => 'date', ]); - $this->assertStringContainsString('
', $result); + $this->assertStringContainsString('
', $result); $result = $this->Form->control('created', [ 'type' => 'time', ]); - $this->assertStringContainsString('
', $result); + $this->assertStringContainsString('
', $result); $this->Form->setTemplates([ 'datetimeContainer' => '
{{content}}
', @@ -637,17 +637,17 @@ public function testInlineAlignDateTimeControlCustomContainerErrorTemplateViaOpt $result = $this->Form->control('created', [ 'type' => 'datetime', ]); - $this->assertStringContainsString('
', $result); + $this->assertStringContainsString('
', $result); $result = $this->Form->control('created', [ 'type' => 'date', ]); - $this->assertStringContainsString('
', $result); + $this->assertStringContainsString('
', $result); $result = $this->Form->control('created', [ 'type' => 'time', ]); - $this->assertStringContainsString('
', $result); + $this->assertStringContainsString('
', $result); $result = $this->Form->control('created', [ 'type' => 'datetime', diff --git a/tests/TestCase/View/Helper/FormHelper/InlineAlign/FileControlTest.php b/tests/TestCase/View/Helper/FormHelper/InlineAlign/FileControlTest.php index 3f5f51a2..0f19f929 100644 --- a/tests/TestCase/View/Helper/FormHelper/InlineAlign/FileControlTest.php +++ b/tests/TestCase/View/Helper/FormHelper/InlineAlign/FileControlTest.php @@ -20,7 +20,7 @@ public function testInlineAlignFileControl() ]); $expected = [ ['div' => ['class' => 'col-auto']], - ['div' => ['class' => 'form-group file']], + ['div' => ['class' => 'file']], ['label' => ['class' => 'form-label visually-hidden', 'for' => 'file']], 'File', '/label', @@ -50,7 +50,7 @@ public function testInlineAlignFileControlWithDisabledLabel() ]); $expected = [ ['div' => ['class' => 'col-auto']], - ['div' => ['class' => 'form-group file']], + ['div' => ['class' => 'file']], ['input' => [ 'type' => 'file', 'name' => 'file', @@ -77,7 +77,7 @@ public function testInlineAlignFileControlWithCustomLabel() ]); $expected = [ ['div' => ['class' => 'col-auto']], - ['div' => ['class' => 'form-group file']], + ['div' => ['class' => 'file']], ['label' => ['class' => 'form-label visually-hidden', 'for' => 'file']], 'Custom Label', '/label', @@ -111,7 +111,7 @@ public function testInlineAlignFileControlWithCustomLabelOptions() ]); $expected = [ ['div' => ['class' => 'col-auto']], - ['div' => ['class' => 'form-group file']], + ['div' => ['class' => 'file']], ['label' => [ 'class' => 'custom-label-class form-label visually-hidden', 'foo' => 'bar', @@ -145,7 +145,7 @@ public function testInlineAlignFileControlWithHelp() ]); $expected = [ ['div' => ['class' => 'col-auto']], - ['div' => ['class' => 'form-group file']], + ['div' => ['class' => 'file']], ['label' => ['class' => 'form-label visually-hidden', 'for' => 'file']], 'File', '/label', @@ -184,7 +184,7 @@ public function testInlineAlignFileControlWithHelpOptions() ]); $expected = [ ['div' => ['class' => 'col-auto']], - ['div' => ['class' => 'form-group file']], + ['div' => ['class' => 'file']], ['label' => ['class' => 'form-label visually-hidden', 'for' => 'file']], 'File', '/label', @@ -222,7 +222,7 @@ public function testInlineAlignFileControlWithTooltip() ]); $expected = [ ['div' => ['class' => 'col-auto']], - ['div' => ['class' => 'form-group file']], + ['div' => ['class' => 'file']], ['label' => ['class' => 'form-label visually-hidden', 'for' => 'file']], 'File ', 'span' => [ @@ -260,7 +260,7 @@ public function testInlineAlignFileControlWithError() ]); $expected = [ ['div' => ['class' => 'col-auto']], - ['div' => ['class' => 'form-group position-relative file is-invalid']], + ['div' => ['class' => 'position-relative file is-invalid']], ['label' => ['class' => 'form-label visually-hidden', 'for' => 'file']], 'File', '/label', @@ -298,7 +298,7 @@ public function testInlineAlignFileControlWithErrorAndHelp() ]); $expected = [ ['div' => ['class' => 'col-auto']], - ['div' => ['class' => 'form-group position-relative file is-invalid']], + ['div' => ['class' => 'position-relative file is-invalid']], ['label' => ['class' => 'form-label visually-hidden', 'for' => 'file']], 'File', '/label', @@ -344,7 +344,7 @@ public function testInlineAlignFileControlWithErrorAndHelpOptions() ]); $expected = [ ['div' => ['class' => 'col-auto']], - ['div' => ['class' => 'form-group position-relative file is-invalid']], + ['div' => ['class' => 'position-relative file is-invalid']], ['label' => ['class' => 'form-label visually-hidden', 'for' => 'file']], 'File', '/label', @@ -391,7 +391,7 @@ public function testInlineAlignFileControlContainerOptions() ['div' => ['class' => 'col-auto']], ['div' => [ 'attribute' => 'container-attribute', - 'class' => 'container-class form-group file', + 'class' => 'container-class file', ]], ['label' => ['class' => 'form-label visually-hidden', 'for' => 'file']], 'File', @@ -430,7 +430,7 @@ public function testInlineAlignFileControlContainerOptionsWithError() ['div' => ['class' => 'col-auto']], ['div' => [ 'attribute' => 'container-attribute', - 'class' => 'container-class form-group position-relative file is-invalid', + 'class' => 'container-class position-relative file is-invalid', ]], ['label' => ['class' => 'form-label visually-hidden', 'for' => 'file']], 'File', @@ -464,7 +464,7 @@ public function testInlineAlignFileControlInputGroupAppend() ]); $expected = [ ['div' => ['class' => 'col-auto']], - ['div' => ['class' => 'form-group file']], + ['div' => ['class' => 'file']], ['label' => ['class' => 'form-label visually-hidden', 'for' => 'file']], 'File', '/label', @@ -497,7 +497,7 @@ public function testInlineAlignFileControlInputGroupPrepend() ]); $expected = [ ['div' => ['class' => 'col-auto']], - ['div' => ['class' => 'form-group file']], + ['div' => ['class' => 'file']], ['label' => ['class' => 'form-label visually-hidden', 'for' => 'file']], 'File', '/label', @@ -533,7 +533,7 @@ public function testInlineAlignFileControlInputGroupWithError() ]); $expected = [ ['div' => ['class' => 'col-auto']], - ['div' => ['class' => 'form-group position-relative file is-invalid']], + ['div' => ['class' => 'position-relative file is-invalid']], ['label' => ['class' => 'form-label visually-hidden', 'for' => 'file']], 'File', '/label', diff --git a/tests/TestCase/View/Helper/FormHelper/InlineAlign/MultipleCheckboxControlTest.php b/tests/TestCase/View/Helper/FormHelper/InlineAlign/MultipleCheckboxControlTest.php index 1fed1aae..6facfc00 100644 --- a/tests/TestCase/View/Helper/FormHelper/InlineAlign/MultipleCheckboxControlTest.php +++ b/tests/TestCase/View/Helper/FormHelper/InlineAlign/MultipleCheckboxControlTest.php @@ -25,7 +25,7 @@ public function testInlineAlignMultipleCheckboxControl() $expected = [ ['div' => ['class' => 'col-auto']], ['div' => [ - 'class' => 'form-group d-flex position-relative multicheckbox', + 'class' => 'd-flex position-relative multicheckbox', 'role' => 'group', 'aria-labelledby' => 'users-group-label', ]], @@ -87,7 +87,7 @@ public function testInlineAlignMultipleCheckboxControlWithDisabledLabel() $expected = [ ['div' => ['class' => 'col-auto']], ['div' => [ - 'class' => 'form-group d-flex position-relative multicheckbox', + 'class' => 'd-flex position-relative multicheckbox', 'role' => 'group', 'aria-labelledby' => 'users-group-label', ]], @@ -146,7 +146,7 @@ public function testInlineAlignMultipleCheckboxControlWithCustomLabel() $expected = [ ['div' => ['class' => 'col-auto']], ['div' => [ - 'class' => 'form-group d-flex position-relative multicheckbox', + 'class' => 'd-flex position-relative multicheckbox', 'role' => 'group', 'aria-labelledby' => 'users-group-label', ]], @@ -212,7 +212,7 @@ public function testInlineAlignMultipleCheckboxControlWithCustomLabelOptions() $expected = [ ['div' => ['class' => 'col-auto']], ['div' => [ - 'class' => 'form-group d-flex position-relative multicheckbox', + 'class' => 'd-flex position-relative multicheckbox', 'role' => 'group', 'aria-labelledby' => 'users-group-label', ]], @@ -278,7 +278,7 @@ public function testInlineAlignMultipleCheckboxControlWithHelp() $expected = [ ['div' => ['class' => 'col-auto']], ['div' => [ - 'class' => 'form-group d-flex position-relative multicheckbox', + 'class' => 'd-flex position-relative multicheckbox', 'role' => 'group', 'aria-labelledby' => 'users-group-label', ]], @@ -350,7 +350,7 @@ public function testInlineAlignMultipleCheckboxControlWithHelpOptions() $expected = [ ['div' => ['class' => 'col-auto']], ['div' => [ - 'class' => 'form-group d-flex position-relative multicheckbox', + 'class' => 'd-flex position-relative multicheckbox', 'role' => 'group', 'aria-labelledby' => 'users-group-label', ]], @@ -418,7 +418,7 @@ public function testInlineAlignMultipleCheckboxControlWithTooltip() $expected = [ ['div' => ['class' => 'col-auto']], ['div' => [ - 'class' => 'form-group d-flex position-relative multicheckbox', + 'class' => 'd-flex position-relative multicheckbox', 'role' => 'group', 'aria-labelledby' => 'users-group-label', ]], @@ -464,7 +464,7 @@ public function testInlineAlignMultipleCheckboxControlWithError() $expected = [ ['div' => ['class' => 'col-auto']], ['div' => [ - 'class' => 'form-group d-flex position-relative multicheckbox is-invalid', + 'class' => 'd-flex position-relative multicheckbox is-invalid', 'role' => 'group', 'aria-labelledby' => 'users-group-label', ]], @@ -537,7 +537,7 @@ public function testInlineAlignMultipleCheckboxControlWithErrorAndHelp() $expected = [ ['div' => ['class' => 'col-auto']], ['div' => [ - 'class' => 'form-group d-flex position-relative multicheckbox is-invalid', + 'class' => 'd-flex position-relative multicheckbox is-invalid', 'role' => 'group', 'aria-labelledby' => 'users-group-label', ]], @@ -618,7 +618,7 @@ public function testInlineAlignMultipleCheckboxControlWithErrorAndHelpOptions() $expected = [ ['div' => ['class' => 'col-auto']], ['div' => [ - 'class' => 'form-group d-flex position-relative multicheckbox is-invalid', + 'class' => 'd-flex position-relative multicheckbox is-invalid', 'role' => 'group', 'aria-labelledby' => 'users-group-label', ]], @@ -699,7 +699,7 @@ public function testInlineAlignMultipleCheckboxControlContainerOptions() ['div' => ['class' => 'col-auto']], ['div' => [ 'attribute' => 'container-attribute', - 'class' => 'container-class form-group d-flex position-relative multicheckbox', + 'class' => 'container-class d-flex position-relative multicheckbox', 'role' => 'group', 'aria-labelledby' => 'users-group-label', ]], @@ -768,7 +768,7 @@ public function testInlineAlignMultipleCheckboxControlContainerOptionsWithError( ['div' => ['class' => 'col-auto']], ['div' => [ 'attribute' => 'container-attribute', - 'class' => 'container-class form-group d-flex position-relative multicheckbox is-invalid', + 'class' => 'container-class d-flex position-relative multicheckbox is-invalid', 'role' => 'group', 'aria-labelledby' => 'users-group-label', ]], @@ -845,7 +845,7 @@ public function testInlineAlignMultipleCheckboxControlWithPerOptionConfiguration $expected = [ ['div' => ['class' => 'col-auto']], ['div' => [ - 'class' => 'form-group d-flex position-relative multicheckbox', + 'class' => 'd-flex position-relative multicheckbox', 'role' => 'group', 'aria-labelledby' => 'users-group-label', ]], @@ -919,7 +919,7 @@ public function testInlineAlignMultipleCheckboxControlNestedInput() $expected = [ ['div' => ['class' => 'col-auto']], ['div' => [ - 'class' => 'form-group d-flex position-relative multicheckbox', + 'class' => 'd-flex position-relative multicheckbox', 'role' => 'group', 'aria-labelledby' => 'users-group-label', ]], @@ -989,7 +989,7 @@ public function testInlineAlignMultipleCheckboxControlWithPerOptionConfiguration $expected = [ ['div' => ['class' => 'col-auto']], ['div' => [ - 'class' => 'form-group d-flex position-relative multicheckbox', + 'class' => 'd-flex position-relative multicheckbox', 'role' => 'group', 'aria-labelledby' => 'users-group-label', ]], @@ -1066,7 +1066,7 @@ public function testInlineAlignMultipleCheckboxControlOptionGroups() $expected = [ ['div' => ['class' => 'col-auto']], ['div' => [ - 'class' => 'form-group d-flex position-relative multicheckbox', + 'class' => 'd-flex position-relative multicheckbox', 'role' => 'group', 'aria-labelledby' => 'users-group-label', ]], @@ -1079,7 +1079,7 @@ public function testInlineAlignMultipleCheckboxControlOptionGroups() 'name' => 'users', 'value' => '', ]], - ['fieldset' => ['class' => 'form-group']], + ' ['class' => 'col-form-label float-none pt-0']], 'group 1', '/legend', @@ -1108,7 +1108,7 @@ public function testInlineAlignMultipleCheckboxControlOptionGroups() '/label', '/div', '/fieldset', - ['fieldset' => ['class' => 'form-group']], + ' ['class' => 'col-form-label float-none pt-0']], 'group 2', '/legend', @@ -1168,7 +1168,7 @@ public function testInlineAlignMultipleCheckboxControlOptionGroupsWithError() $expected = [ ['div' => ['class' => 'col-auto']], ['div' => [ - 'class' => 'form-group d-flex position-relative multicheckbox is-invalid', + 'class' => 'd-flex position-relative multicheckbox is-invalid', 'role' => 'group', 'aria-labelledby' => 'users-group-label', ]], @@ -1182,7 +1182,7 @@ public function testInlineAlignMultipleCheckboxControlOptionGroupsWithError() 'name' => 'users', 'value' => '', ]], - ['fieldset' => ['class' => 'form-group']], + ' ['class' => 'col-form-label float-none pt-0']], 'group 1', '/legend', @@ -1215,7 +1215,7 @@ public function testInlineAlignMultipleCheckboxControlOptionGroupsWithError() '/label', '/div', '/fieldset', - ['fieldset' => ['class' => 'form-group']], + ' ['class' => 'col-form-label float-none pt-0']], 'group 2', '/legend', @@ -1274,7 +1274,7 @@ public function testInlineAlignMultipleCheckboxControlSwitch() $expected = [ ['div' => ['class' => 'col-auto']], ['div' => [ - 'class' => 'form-group d-flex position-relative multicheckbox', + 'class' => 'd-flex position-relative multicheckbox', 'role' => 'group', 'aria-labelledby' => 'users-group-label', ]], diff --git a/tests/TestCase/View/Helper/FormHelper/InlineAlign/RadioControlTest.php b/tests/TestCase/View/Helper/FormHelper/InlineAlign/RadioControlTest.php index c9e26094..6dcfe0d7 100644 --- a/tests/TestCase/View/Helper/FormHelper/InlineAlign/RadioControlTest.php +++ b/tests/TestCase/View/Helper/FormHelper/InlineAlign/RadioControlTest.php @@ -25,7 +25,7 @@ public function testInlineAlignRadioControl() $expected = [ ['div' => ['class' => 'col-auto']], ['div' => [ - 'class' => 'form-group position-relative radio', + 'class' => 'position-relative radio', 'role' => 'group', 'aria-labelledby' => 'users-group-label', ]], @@ -88,7 +88,7 @@ public function testInlineAlignRadioControlWithDisabledLabel() $expected = [ ['div' => ['class' => 'col-auto']], ['div' => [ - 'class' => 'form-group position-relative radio', + 'class' => 'position-relative radio', 'role' => 'group', 'aria-labelledby' => 'users-group-label', ]], @@ -147,7 +147,7 @@ public function testInlineAlignRadioControlWithCustomLabel() $expected = [ ['div' => ['class' => 'col-auto']], ['div' => [ - 'class' => 'form-group position-relative radio', + 'class' => 'position-relative radio', 'role' => 'group', 'aria-labelledby' => 'users-group-label', ]], @@ -213,7 +213,7 @@ public function testInlineAlignRadioControlWithCustomLabelOptions() $expected = [ ['div' => ['class' => 'col-auto']], ['div' => [ - 'class' => 'form-group position-relative radio', + 'class' => 'position-relative radio', 'role' => 'group', 'aria-labelledby' => 'users-group-label', ]], @@ -279,7 +279,7 @@ public function testInlineAlignRadioControlWithHelp() $expected = [ ['div' => ['class' => 'col-auto']], ['div' => [ - 'class' => 'form-group position-relative radio', + 'class' => 'position-relative radio', 'role' => 'group', 'aria-labelledby' => 'users-group-label', ]], @@ -351,7 +351,7 @@ public function testInlineAlignRadioControlWithHelpOptions() $expected = [ ['div' => ['class' => 'col-auto']], ['div' => [ - 'class' => 'form-group position-relative radio', + 'class' => 'position-relative radio', 'role' => 'group', 'aria-labelledby' => 'users-group-label', ]], @@ -418,7 +418,7 @@ public function testInlineAlignRadioControlWithTooltip() $expected = [ ['div' => ['class' => 'col-auto']], ['div' => [ - 'class' => 'form-group position-relative radio', + 'class' => 'position-relative radio', 'role' => 'group', 'aria-labelledby' => 'published-group-label', ]], @@ -464,7 +464,7 @@ public function testInlineAlignRadioControlWithError() $expected = [ ['div' => ['class' => 'col-auto']], ['div' => [ - 'class' => 'form-group position-relative radio is-invalid', + 'class' => 'position-relative radio is-invalid', 'role' => 'group', 'aria-labelledby' => 'users-group-label', ]], @@ -537,7 +537,7 @@ public function testInlineAlignRadioControlWithErrorAndHelp() $expected = [ ['div' => ['class' => 'col-auto']], ['div' => [ - 'class' => 'form-group position-relative radio is-invalid', + 'class' => 'position-relative radio is-invalid', 'role' => 'group', 'aria-labelledby' => 'users-group-label', ]], @@ -618,7 +618,7 @@ public function testInlineAlignRadioControlWithErrorAndHelpOptions() $expected = [ ['div' => ['class' => 'col-auto']], ['div' => [ - 'class' => 'form-group position-relative radio is-invalid', + 'class' => 'position-relative radio is-invalid', 'role' => 'group', 'aria-labelledby' => 'users-group-label', ]], @@ -699,7 +699,7 @@ public function testInlineAlignRadioControlContainerOptions() ['div' => ['class' => 'col-auto']], ['div' => [ 'attribute' => 'container-attribute', - 'class' => 'container-class form-group position-relative radio', + 'class' => 'container-class position-relative radio', 'role' => 'group', 'aria-labelledby' => 'users-group-label', ]], @@ -768,7 +768,7 @@ public function testInlineAlignRadioControlContainerOptionsWithError() ['div' => ['class' => 'col-auto']], ['div' => [ 'attribute' => 'container-attribute', - 'class' => 'container-class form-group position-relative radio is-invalid', + 'class' => 'container-class position-relative radio is-invalid', 'role' => 'group', 'aria-labelledby' => 'users-group-label', ]], @@ -845,7 +845,7 @@ public function testInlineAlignRadioControlWithPerOptionConfiguration() $expected = [ ['div' => ['class' => 'col-auto']], ['div' => [ - 'class' => 'form-group position-relative radio', + 'class' => 'position-relative radio', 'role' => 'group', 'aria-labelledby' => 'users-group-label', ]], @@ -919,7 +919,7 @@ public function testInlineAlignRadioControlNestedInput() $expected = [ ['div' => ['class' => 'col-auto']], ['div' => [ - 'class' => 'form-group position-relative radio', + 'class' => 'position-relative radio', 'role' => 'group', 'aria-labelledby' => 'users-group-label', ]], @@ -989,7 +989,7 @@ public function testInlineAlignRadioControlWithPerOptionConfigurationNestedInput $expected = [ ['div' => ['class' => 'col-auto']], ['div' => [ - 'class' => 'form-group position-relative radio', + 'class' => 'position-relative radio', 'role' => 'group', 'aria-labelledby' => 'users-group-label', ]], diff --git a/tests/TestCase/View/Helper/FormHelper/InlineAlign/RangeControlTest.php b/tests/TestCase/View/Helper/FormHelper/InlineAlign/RangeControlTest.php index 4e80be29..60a65b3e 100644 --- a/tests/TestCase/View/Helper/FormHelper/InlineAlign/RangeControlTest.php +++ b/tests/TestCase/View/Helper/FormHelper/InlineAlign/RangeControlTest.php @@ -21,7 +21,7 @@ public function testInlineAlignRangeControl() ]); $expected = [ ['div' => ['class' => 'col-auto']], - 'div' => ['class' => 'form-group range'], + 'div' => ['class' => 'range'], ['label' => ['class' => 'form-label visually-hidden', 'for' => 'height']], 'Height', '/label', @@ -55,7 +55,7 @@ public function testInlineAlignRangeControlWithDisabledLabel() ]); $expected = [ ['div' => ['class' => 'col-auto']], - 'div' => ['class' => 'form-group range'], + 'div' => ['class' => 'range'], 'input' => [ 'type' => 'range', 'name' => 'height', @@ -86,7 +86,7 @@ public function testInlineAlignRangeControlWithCustomLabel() ]); $expected = [ ['div' => ['class' => 'col-auto']], - 'div' => ['class' => 'form-group range'], + 'div' => ['class' => 'range'], ['label' => ['class' => 'form-label visually-hidden', 'for' => 'height']], 'Custom Label', '/label', @@ -124,7 +124,7 @@ public function testInlineAlignRangeControlWithCustomLabelOptions() ]); $expected = [ ['div' => ['class' => 'col-auto']], - 'div' => ['class' => 'form-group range'], + 'div' => ['class' => 'range'], ['label' => [ 'class' => 'custom-label-class form-label visually-hidden', 'foo' => 'bar', @@ -162,7 +162,7 @@ public function testInlineAlignRangeControlWithHelp() ]); $expected = [ ['div' => ['class' => 'col-auto']], - 'div' => ['class' => 'form-group range'], + 'div' => ['class' => 'range'], ['label' => ['class' => 'form-label visually-hidden', 'for' => 'height']], 'Height', '/label', @@ -205,7 +205,7 @@ public function testInlineAlignRangeControlWithHelpOptions() ]); $expected = [ ['div' => ['class' => 'col-auto']], - 'div' => ['class' => 'form-group range'], + 'div' => ['class' => 'range'], ['label' => ['class' => 'form-label visually-hidden', 'for' => 'height']], 'Height', '/label', @@ -247,7 +247,7 @@ public function testInlineAlignRangeControlWithTooltip() ]); $expected = [ ['div' => ['class' => 'col-auto']], - 'div' => ['class' => 'form-group range'], + 'div' => ['class' => 'range'], ['label' => ['class' => 'form-label visually-hidden', 'for' => 'height']], 'Height ', 'span' => [ @@ -289,7 +289,7 @@ public function testInlineAlignRangeControlWithError() ]); $expected = [ ['div' => ['class' => 'col-auto']], - 'div' => ['class' => 'form-group position-relative range is-invalid'], + 'div' => ['class' => 'position-relative range is-invalid'], ['label' => ['class' => 'form-label visually-hidden', 'for' => 'height']], 'Height', '/label', @@ -331,7 +331,7 @@ public function testInlineAlignRangeControlWithErrorAndHelp() ]); $expected = [ ['div' => ['class' => 'col-auto']], - 'div' => ['class' => 'form-group position-relative range is-invalid'], + 'div' => ['class' => 'position-relative range is-invalid'], ['label' => ['class' => 'form-label visually-hidden', 'for' => 'height']], 'Height', '/label', @@ -381,7 +381,7 @@ public function testInlineAlignRangeControlWithErrorAndHelpOptions() ]); $expected = [ ['div' => ['class' => 'col-auto']], - 'div' => ['class' => 'form-group position-relative range is-invalid'], + 'div' => ['class' => 'position-relative range is-invalid'], ['label' => ['class' => 'form-label visually-hidden', 'for' => 'height']], 'Height', '/label', @@ -432,7 +432,7 @@ public function testInlineAlignRangeControlContainerOptions() ['div' => ['class' => 'col-auto']], 'div' => [ 'attribute' => 'container-attribute', - 'class' => 'container-class form-group range', + 'class' => 'container-class range', ], ['label' => ['class' => 'form-label visually-hidden', 'for' => 'height']], 'Height', @@ -475,7 +475,7 @@ public function testInlineAlignRangeControlContainerOptionsWithError() ['div' => ['class' => 'col-auto']], 'div' => [ 'attribute' => 'container-attribute', - 'class' => 'container-class form-group position-relative range is-invalid', + 'class' => 'container-class position-relative range is-invalid', ], ['label' => ['class' => 'form-label visually-hidden', 'for' => 'height']], 'Height', diff --git a/tests/TestCase/View/Helper/FormHelper/InlineAlign/SelectControlTest.php b/tests/TestCase/View/Helper/FormHelper/InlineAlign/SelectControlTest.php index 1c17b4ed..0a7f0201 100644 --- a/tests/TestCase/View/Helper/FormHelper/InlineAlign/SelectControlTest.php +++ b/tests/TestCase/View/Helper/FormHelper/InlineAlign/SelectControlTest.php @@ -22,7 +22,7 @@ public function testInlineAlignSelectControl() ]); $expected = [ ['div' => ['class' => 'col-auto']], - 'div' => ['class' => 'form-group select'], + 'div' => ['class' => 'select'], ['label' => ['class' => 'form-label visually-hidden', 'for' => 'users']], 'Users', '/label', @@ -58,7 +58,7 @@ public function testInlineAlignSelectControlWithFloatingLabel() ]); $expected = [ ['div' => ['class' => 'col-auto']], - 'div' => ['class' => 'form-floating form-group select'], + 'div' => ['class' => 'form-floating select'], ['select' => ['name' => 'users', 'id' => 'users', 'class' => 'form-select']], ['option' => ['value' => '1']], 'option 1', @@ -92,7 +92,7 @@ public function testInlineAlignSelectControlWithDisabledLabel() ]); $expected = [ ['div' => ['class' => 'col-auto']], - 'div' => ['class' => 'form-group select'], + 'div' => ['class' => 'select'], ['select' => ['name' => 'users', 'id' => 'users', 'class' => 'form-select']], ['option' => ['value' => '1']], 'option 1', @@ -123,7 +123,7 @@ public function testInlineAlignSelectControlWithCustomLabel() ]); $expected = [ ['div' => ['class' => 'col-auto']], - 'div' => ['class' => 'form-group select'], + 'div' => ['class' => 'select'], ['label' => ['class' => 'form-label visually-hidden', 'for' => 'users']], 'Custom Label', '/label', @@ -161,7 +161,7 @@ public function testInlineAlignSelectControlWithCustomLabelOptions() ]); $expected = [ ['div' => ['class' => 'col-auto']], - 'div' => ['class' => 'form-group select'], + 'div' => ['class' => 'select'], 'label' => [ 'for' => 'users', 'class' => 'custom-label-class form-label visually-hidden', @@ -199,7 +199,7 @@ public function testInlineAlignSelectControlWithHelp() ]); $expected = [ ['div' => ['class' => 'col-auto']], - 'div' => ['class' => 'form-group select'], + 'div' => ['class' => 'select'], ['label' => ['class' => 'form-label visually-hidden', 'for' => 'users']], 'Users', '/label', @@ -246,7 +246,7 @@ public function testInlineAlignSelectControlWithHelpOptions() ]); $expected = [ ['div' => ['class' => 'col-auto']], - 'div' => ['class' => 'form-group select'], + 'div' => ['class' => 'select'], ['label' => ['class' => 'form-label visually-hidden', 'for' => 'users']], 'Users', '/label', @@ -292,7 +292,7 @@ public function testInlineAlignSelectControlWithTooltip() ]); $expected = [ ['div' => ['class' => 'col-auto']], - 'div' => ['class' => 'form-group select'], + 'div' => ['class' => 'select'], ['label' => ['class' => 'form-label visually-hidden', 'for' => 'users']], 'Users', 'span' => [ @@ -334,7 +334,7 @@ public function testInlineAlignSelectControlWithError() ]); $expected = [ ['div' => ['class' => 'col-auto']], - 'div' => ['class' => 'form-group position-relative select is-invalid'], + 'div' => ['class' => 'position-relative select is-invalid'], ['label' => ['class' => 'form-label visually-hidden', 'for' => 'users']], 'Users', '/label', @@ -380,7 +380,7 @@ public function testInlineAlignSelectControlWithErrorAndHelp() ]); $expected = [ ['div' => ['class' => 'col-auto']], - 'div' => ['class' => 'form-group position-relative select is-invalid'], + 'div' => ['class' => 'position-relative select is-invalid'], ['label' => ['class' => 'form-label visually-hidden', 'for' => 'users']], 'Users', '/label', @@ -434,7 +434,7 @@ public function testInlineAlignSelectControlWithErrorAndHelpOptions() ]); $expected = [ ['div' => ['class' => 'col-auto']], - 'div' => ['class' => 'form-group position-relative select is-invalid'], + 'div' => ['class' => 'position-relative select is-invalid'], ['label' => ['class' => 'form-label visually-hidden', 'for' => 'users']], 'Users', '/label', @@ -489,7 +489,7 @@ public function testInlineAlignSelectControlContainerOptions() ['div' => ['class' => 'col-auto']], 'div' => [ 'attribute' => 'container-attribute', - 'class' => 'container-class form-group select', + 'class' => 'container-class select', ], ['label' => ['class' => 'form-label visually-hidden', 'for' => 'users']], 'Users', @@ -532,7 +532,7 @@ public function testInlineAlignSelectControlContainerOptionsWithError() ['div' => ['class' => 'col-auto']], 'div' => [ 'attribute' => 'container-attribute', - 'class' => 'container-class form-group position-relative select is-invalid', + 'class' => 'container-class position-relative select is-invalid', ], ['label' => ['class' => 'form-label visually-hidden', 'for' => 'users']], 'Users', @@ -576,7 +576,7 @@ public function testInlineAlignSelectControlInputGroupAppend() ]); $expected = [ ['div' => ['class' => 'col-auto']], - ['div' => ['class' => 'form-group select']], + ['div' => ['class' => 'select']], ['label' => ['class' => 'form-label visually-hidden', 'for' => 'users']], 'Users', '/label', @@ -615,7 +615,7 @@ public function testInlineAlignSelectControlInputGroupPrepend() ]); $expected = [ ['div' => ['class' => 'col-auto']], - ['div' => ['class' => 'form-group select']], + ['div' => ['class' => 'select']], ['label' => ['class' => 'form-label visually-hidden', 'for' => 'users']], 'Users', '/label', diff --git a/tests/TestCase/View/Helper/FormHelper/InlineAlign/StaticControlTest.php b/tests/TestCase/View/Helper/FormHelper/InlineAlign/StaticControlTest.php index cdd58cdd..7882ed68 100644 --- a/tests/TestCase/View/Helper/FormHelper/InlineAlign/StaticControlTest.php +++ b/tests/TestCase/View/Helper/FormHelper/InlineAlign/StaticControlTest.php @@ -20,7 +20,7 @@ public function testInlineAlignStaticControl() $result = $this->Form->control('title', ['type' => 'staticControl']); $expected = [ ['div' => ['class' => 'col-auto']], - 'div' => ['class' => 'form-group staticControl'], + 'div' => ['class' => 'staticControl'], 'label' => ['class' => 'form-label visually-hidden', 'for' => 'title'], 'Title', '/label', @@ -58,7 +58,7 @@ public function testInlineAlignStaticControlWithoutHiddenField() ]); $expected = [ ['div' => ['class' => 'col-auto']], - 'div' => ['class' => 'form-group staticControl'], + 'div' => ['class' => 'staticControl'], 'label' => ['class' => 'form-label visually-hidden', 'for' => 'title'], 'Title', '/label', @@ -88,7 +88,7 @@ public function testInlineAlignStaticControlWithDisabledLabel() ]); $expected = [ ['div' => ['class' => 'col-auto']], - 'div' => ['class' => 'form-group staticControl'], + 'div' => ['class' => 'staticControl'], 'p' => ['class' => 'form-control-plaintext'], 'title', '/p', @@ -118,7 +118,7 @@ public function testInlineAlignStaticControlWithCustomLabel() ]); $expected = [ ['div' => ['class' => 'col-auto']], - 'div' => ['class' => 'form-group staticControl'], + 'div' => ['class' => 'staticControl'], 'label' => ['class' => 'form-label visually-hidden', 'for' => 'title'], 'Custom Label', '/label', @@ -155,7 +155,7 @@ public function testInlineAlignStaticControlWithCustomLabelOptions() ]); $expected = [ ['div' => ['class' => 'col-auto']], - 'div' => ['class' => 'form-group staticControl'], + 'div' => ['class' => 'staticControl'], 'label' => [ 'class' => 'custom-label-class form-label visually-hidden', 'foo' => 'bar', @@ -192,7 +192,7 @@ public function testInlineAlignStaticControlWithHelp() ]); $expected = [ ['div' => ['class' => 'col-auto']], - 'div' => ['class' => 'form-group staticControl'], + 'div' => ['class' => 'staticControl'], 'label' => ['class' => 'form-label visually-hidden', 'for' => 'title'], 'Title', '/label', @@ -234,7 +234,7 @@ public function testInlineAlignStaticControlWithHelpOptions() ]); $expected = [ ['div' => ['class' => 'col-auto']], - 'div' => ['class' => 'form-group staticControl'], + 'div' => ['class' => 'staticControl'], 'label' => ['class' => 'form-label visually-hidden', 'for' => 'title'], 'Title', '/label', @@ -275,7 +275,7 @@ public function testInlineAlignStaticControlWithTooltip() ]); $expected = [ ['div' => ['class' => 'col-auto']], - 'div' => ['class' => 'form-group staticControl'], + 'div' => ['class' => 'staticControl'], 'label' => ['class' => 'form-label visually-hidden', 'for' => 'title'], 'Title', 'span' => [ @@ -316,7 +316,7 @@ public function testInlineAlignStaticControlWithError() ]); $expected = [ ['div' => ['class' => 'col-auto']], - 'div' => ['class' => 'form-group position-relative staticControl is-invalid'], + 'div' => ['class' => 'position-relative staticControl is-invalid'], 'label' => ['class' => 'form-label visually-hidden', 'for' => 'title'], 'Title', '/label', @@ -358,7 +358,7 @@ public function testInlineAlignStaticControlWithErrorAndHelp() ]); $expected = [ ['div' => ['class' => 'col-auto']], - 'div' => ['class' => 'form-group position-relative staticControl is-invalid'], + 'div' => ['class' => 'position-relative staticControl is-invalid'], 'label' => ['class' => 'form-label visually-hidden', 'for' => 'title'], 'Title', '/label', @@ -408,7 +408,7 @@ public function testInlineAlignStaticControlWithErrorAndHelpOptions() ]); $expected = [ ['div' => ['class' => 'col-auto']], - 'div' => ['class' => 'form-group position-relative staticControl is-invalid'], + 'div' => ['class' => 'position-relative staticControl is-invalid'], 'label' => ['class' => 'form-label visually-hidden', 'for' => 'title'], 'Title', '/label', @@ -459,7 +459,7 @@ public function testInlineAlignStaticControlContainerOptions() ['div' => ['class' => 'col-auto']], 'div' => [ 'attribute' => 'container-attribute', - 'class' => 'container-class form-group staticControl', + 'class' => 'container-class staticControl', ], 'label' => ['class' => 'form-label visually-hidden', 'for' => 'title'], 'Title', @@ -501,7 +501,7 @@ public function testInlineAlignStaticControlContainerOptionsWithError() ['div' => ['class' => 'col-auto']], 'div' => [ 'attribute' => 'container-attribute', - 'class' => 'container-class form-group position-relative staticControl is-invalid', + 'class' => 'container-class position-relative staticControl is-invalid', ], 'label' => ['class' => 'form-label visually-hidden', 'for' => 'title'], 'Title', diff --git a/tests/TestCase/View/Helper/FormHelper/InlineAlign/TextControlTest.php b/tests/TestCase/View/Helper/FormHelper/InlineAlign/TextControlTest.php index 95866bff..851779a4 100644 --- a/tests/TestCase/View/Helper/FormHelper/InlineAlign/TextControlTest.php +++ b/tests/TestCase/View/Helper/FormHelper/InlineAlign/TextControlTest.php @@ -17,7 +17,7 @@ public function testInlineAlignTextControl() $result = $this->Form->control('title'); $expected = [ ['div' => ['class' => 'col-auto']], - 'div' => ['class' => 'form-group text'], + 'div' => ['class' => 'text'], 'label' => ['class' => 'form-label visually-hidden', 'for' => 'title'], 'Title', '/label', @@ -47,7 +47,7 @@ public function testInlineAlignTextControlWithFloatingLabel() ]); $expected = [ ['div' => ['class' => 'col-auto']], - 'div' => ['class' => 'form-floating form-group text'], + 'div' => ['class' => 'form-floating text'], 'input' => [ 'type' => 'text', 'name' => 'title', @@ -79,7 +79,7 @@ public function testInlineAlignTextControlWithFloatingLabelAndCustomLabelText() ]); $expected = [ ['div' => ['class' => 'col-auto']], - 'div' => ['class' => 'form-floating form-group text'], + 'div' => ['class' => 'form-floating text'], 'input' => [ 'type' => 'text', 'name' => 'title', @@ -111,7 +111,7 @@ public function testInlineAlignTextControlWithFloatingLabelAndCustomPlaceholder( ]); $expected = [ ['div' => ['class' => 'col-auto']], - 'div' => ['class' => 'form-floating form-group text'], + 'div' => ['class' => 'form-floating text'], 'input' => [ 'type' => 'text', 'name' => 'title', @@ -143,7 +143,7 @@ public function testInlineAlignTextControlWithFloatingLabelAndDisabledPlaceholde ]); $expected = [ ['div' => ['class' => 'col-auto']], - 'div' => ['class' => 'form-floating form-group text'], + 'div' => ['class' => 'form-floating text'], 'input' => [ 'type' => 'text', 'name' => 'title', @@ -169,7 +169,7 @@ public function testInlineAlignTextControlWithDisabledLabel() $result = $this->Form->control('title', ['label' => false]); $expected = [ ['div' => ['class' => 'col-auto']], - 'div' => ['class' => 'form-group text'], + 'div' => ['class' => 'text'], 'input' => [ 'type' => 'text', 'name' => 'title', @@ -192,7 +192,7 @@ public function testInlineAlignTextControlWithCustomLabel() $result = $this->Form->control('title', ['label' => 'Custom Label']); $expected = [ ['div' => ['class' => 'col-auto']], - 'div' => ['class' => 'form-group text'], + 'div' => ['class' => 'text'], 'label' => ['class' => 'form-label visually-hidden', 'for' => 'title'], 'Custom Label', '/label', @@ -224,7 +224,7 @@ public function testInlineAlignTextControlWithCustomLabelOptions() ]); $expected = [ ['div' => ['class' => 'col-auto']], - 'div' => ['class' => 'form-group text'], + 'div' => ['class' => 'text'], 'label' => [ 'class' => 'custom-label-class form-label visually-hidden', 'foo' => 'bar', @@ -256,7 +256,7 @@ public function testInlineAlignTextControlWithHelp() ]); $expected = [ ['div' => ['class' => 'col-auto']], - 'div' => ['class' => 'form-group text'], + 'div' => ['class' => 'text'], 'label' => ['class' => 'form-label visually-hidden', 'for' => 'title'], 'Title', '/label', @@ -293,7 +293,7 @@ public function testInlineAlignTextControlWithHelpOptions() ]); $expected = [ ['div' => ['class' => 'col-auto']], - 'div' => ['class' => 'form-group text'], + 'div' => ['class' => 'text'], 'label' => ['class' => 'form-label visually-hidden', 'for' => 'title'], 'Title', '/label', @@ -329,7 +329,7 @@ public function testInlineAlignTextControlWithTooltip() ]); $expected = [ ['div' => ['class' => 'col-auto']], - 'div' => ['class' => 'form-group text'], + 'div' => ['class' => 'text'], 'label' => ['class' => 'form-label visually-hidden', 'for' => 'title'], 'Title', 'span' => [ @@ -364,7 +364,7 @@ public function testInlineAlignTextControlWithError() $result = $this->Form->control('title'); $expected = [ ['div' => ['class' => 'col-auto']], - 'div' => ['class' => 'form-group position-relative text is-invalid'], + 'div' => ['class' => 'position-relative text is-invalid'], 'label' => ['class' => 'form-label visually-hidden', 'for' => 'title'], 'Title', '/label', @@ -400,7 +400,7 @@ public function testInlineAlignTextControlWithErrorAndHelp() ]); $expected = [ ['div' => ['class' => 'col-auto']], - 'div' => ['class' => 'form-group position-relative text is-invalid'], + 'div' => ['class' => 'position-relative text is-invalid'], 'label' => ['class' => 'form-label visually-hidden', 'for' => 'title'], 'Title', '/label', @@ -444,7 +444,7 @@ public function testInlineAlignTextControlWithErrorAndHelpOptions() ]); $expected = [ ['div' => ['class' => 'col-auto']], - 'div' => ['class' => 'form-group position-relative text is-invalid'], + 'div' => ['class' => 'position-relative text is-invalid'], 'label' => ['class' => 'form-label visually-hidden', 'for' => 'title'], 'Title', '/label', @@ -490,7 +490,7 @@ public function testInlineAlignTextControlContainerOptions() ['div' => ['class' => 'col-auto']], 'div' => [ 'attribute' => 'container-attribute', - 'class' => 'container-class form-group text', + 'class' => 'container-class text', ], 'label' => ['class' => 'form-label visually-hidden', 'for' => 'title'], 'Title', @@ -528,7 +528,7 @@ public function testInlineAlignTextControlContainerOptionsWithError() ['div' => ['class' => 'col-auto']], 'div' => [ 'attribute' => 'container-attribute', - 'class' => 'container-class form-group position-relative text is-invalid', + 'class' => 'container-class position-relative text is-invalid', ], 'label' => ['class' => 'form-label visually-hidden', 'for' => 'title'], 'Title', diff --git a/tests/TestCase/View/Helper/FormHelperTest.php b/tests/TestCase/View/Helper/FormHelperTest.php index 0514a9be..e1ef9bd8 100644 --- a/tests/TestCase/View/Helper/FormHelperTest.php +++ b/tests/TestCase/View/Helper/FormHelperTest.php @@ -16,7 +16,7 @@ public function testBasicPasswordControl() $result = $this->Form->control('password'); $expected = [ - 'div' => ['class' => 'mb-3 form-group password'], + 'div' => ['class' => 'mb-3 password'], 'label' => ['class' => 'form-label', 'for' => 'password'], 'Password', '/label', @@ -42,7 +42,7 @@ public function testRequiredTextControl() $result = $this->Form->control('title'); $expected = [ - 'div' => ['class' => 'mb-3 form-group text required'], + 'div' => ['class' => 'mb-3 text required'], 'label' => ['class' => 'form-label', 'for' => 'title'], 'Title', '/label', @@ -67,7 +67,7 @@ public function testAddOnPrependedText() $result = $this->Form->control('title', ['prepend' => '@']); $expected = [ - 'div' => ['class' => 'mb-3 form-group text required'], + 'div' => ['class' => 'mb-3 text required'], 'label' => ['class' => 'form-label', 'for' => 'title'], 'Title', '/label', @@ -97,7 +97,7 @@ public function testAddOnPrependedTextMultiple() $result = $this->Form->control('title', ['prepend' => ['$', '0.00']]); $expected = [ - 'div' => ['class' => 'mb-3 form-group text required'], + 'div' => ['class' => 'mb-3 text required'], 'label' => ['class' => 'form-label', 'for' => 'title'], 'Title', '/label', @@ -130,7 +130,7 @@ public function testAddOnAppendedText() $result = $this->Form->control('title', ['append' => '@']); $expected = [ - 'div' => ['class' => 'mb-3 form-group text required'], + 'div' => ['class' => 'mb-3 text required'], 'label' => ['class' => 'form-label', 'for' => 'title'], 'Title', '/label', @@ -160,7 +160,7 @@ public function testAddOnAppendedTextMultiple() $result = $this->Form->control('title', ['append' => ['$', '0.00']]); $expected = [ - 'div' => ['class' => 'mb-3 form-group text required'], + 'div' => ['class' => 'mb-3 text required'], 'label' => ['class' => 'form-label', 'for' => 'title'], 'Title', '/label', @@ -193,7 +193,7 @@ public function testAddOnPrependedButton() $result = $this->Form->control('title', ['prepend' => $this->Form->button('GO')]); $expected = [ - 'div' => ['class' => 'mb-3 form-group text required'], + 'div' => ['class' => 'mb-3 text required'], 'label' => ['class' => 'form-label', 'for' => 'title'], 'Title', '/label', @@ -228,7 +228,7 @@ public function testAddOnPrependedButtonMultiple() ], ]); $expected = [ - 'div' => ['class' => 'mb-3 form-group text required'], + 'div' => ['class' => 'mb-3 text required'], 'label' => ['class' => 'form-label', 'for' => 'title'], 'Title', '/label', @@ -261,7 +261,7 @@ public function testAddOnAppendedButton() $result = $this->Form->control('title', ['append' => $this->Form->button('GO')]); $expected = [ - 'div' => ['class' => 'mb-3 form-group text required'], + 'div' => ['class' => 'mb-3 text required'], 'label' => ['class' => 'form-label', 'for' => 'title'], 'Title', '/label', @@ -296,7 +296,7 @@ public function testAddOnAppendedButtonMultiple() ], ]); $expected = [ - 'div' => ['class' => 'mb-3 form-group text required'], + 'div' => ['class' => 'mb-3 text required'], 'label' => ['class' => 'form-label', 'for' => 'title'], 'Title', '/label', @@ -329,7 +329,7 @@ public function testAddOnOptions() $result = $this->Form->control('title', ['prepend' => ['@', ['size' => 'lg']]]); $expected = [ - 'div' => ['class' => 'mb-3 form-group text required'], + 'div' => ['class' => 'mb-3 text required'], 'label' => ['class' => 'form-label', 'for' => 'title'], 'Title', '/label', @@ -354,7 +354,7 @@ public function testAddOnOptions() $result = $this->Form->control('title', ['append' => ['@', ['size' => 'lg']]]); $expected = [ - 'div' => ['class' => 'mb-3 form-group text required'], + 'div' => ['class' => 'mb-3 text required'], 'label' => ['class' => 'form-label', 'for' => 'title'], 'Title', '/label', @@ -388,7 +388,7 @@ public function testAddOnOptionsMultiple() ], ]); $expected = [ - 'div' => ['class' => 'mb-3 form-group text required'], + 'div' => ['class' => 'mb-3 text required'], 'label' => ['class' => 'form-label', 'for' => 'title'], 'Title', '/label', @@ -420,7 +420,7 @@ public function testAddOnOptionsMultiple() ], ]); $expected = [ - 'div' => ['class' => 'mb-3 form-group text required'], + 'div' => ['class' => 'mb-3 text required'], 'label' => ['class' => 'form-label', 'for' => 'title'], 'Title', '/label', @@ -457,7 +457,7 @@ public function testAddOnWithError() $result = $this->Form->control('title', ['prepend' => '@']); $expected = [ - 'div' => ['class' => 'mb-3 form-group text is-invalid'], + 'div' => ['class' => 'mb-3 text is-invalid'], 'label' => ['class' => 'form-label', 'for' => 'title'], 'Title', '/label', @@ -483,7 +483,7 @@ public function testAddOnWithError() $result = $this->Form->control('title', ['append' => '@']); $expected = [ - 'div' => ['class' => 'mb-3 form-group text is-invalid'], + 'div' => ['class' => 'mb-3 text is-invalid'], 'label' => ['class' => 'form-label', 'for' => 'title'], 'Title', '/label', @@ -618,7 +618,7 @@ public function testFormCreateWithTemplatesFile() $result = $this->Form->control('title'); $expected = [ - 'div' => ['class' => 'custom-container mb-3 form-group'], + 'div' => ['class' => 'custom-container mb-3'], 'label' => ['class' => 'form-label', 'for' => 'title'], 'Title', '/label', @@ -695,7 +695,7 @@ public function testCustomGridWithConstantsConfig() $result = $this->Form->control('title'); $expected = [ - 'div' => ['class' => 'mb-3 form-group row text required'], + 'div' => ['class' => 'mb-3 row text required'], 'label' => [ 'class' => 'col-form-label col-md-3', 'for' => 'title', @@ -730,7 +730,7 @@ public function testCustomGridWithBasicArrayConfig() $result = $this->Form->control('title'); $expected = [ - 'div' => ['class' => 'mb-3 form-group row text required'], + 'div' => ['class' => 'mb-3 row text required'], 'label' => [ 'class' => 'col-form-label col-md-3', 'for' => 'title', @@ -777,7 +777,7 @@ public function testHorizontalFormCreateFromConfig() $result = $this->Form->control('title'); $expected = [ - 'div' => ['class' => 'mb-3 form-group row text required'], + 'div' => ['class' => 'mb-3 row text required'], 'label' => [ 'class' => 'col-form-label col-md-2', 'for' => 'title', @@ -802,7 +802,7 @@ public function testHorizontalFormCreateFromConfig() $result = $this->Form->control('published'); $expected = [ - 'div' => ['class' => 'mb-3 form-group row checkbox'], + 'div' => ['class' => 'mb-3 row checkbox'], ['div' => ['class' => 'offset-md-2 col-md-10']], ['div' => ['class' => 'form-check my-checkbox']], 'input' => [ @@ -896,7 +896,7 @@ public function testTooltipWithDisabledLabel() 'label' => false, ]); $expected = [ - 'div' => ['class' => 'mb-3 form-group text required'], + 'div' => ['class' => 'mb-3 text required'], 'input' => [ 'type' => 'text', 'name' => 'title', @@ -926,7 +926,7 @@ public function testFormControlWithoutOpenForm() $result = $Form->control('title'); $expected = [ - ['div' => ['class' => 'form-group text']], + ['div' => ['class' => 'text']], ['label' => ['class' => 'form-label', 'for' => 'title']], 'Title', '/label', @@ -1006,7 +1006,7 @@ public function testFeedbackStyleFromHelperConfig() $result = $this->Form->control('title'); $expected = [ - ['div' => ['class' => 'mb-3 form-group position-relative text is-invalid']], + ['div' => ['class' => 'mb-3 position-relative text is-invalid']], ['label' => ['class' => 'form-label', 'for' => 'title']], 'Title', '/label', @@ -1041,7 +1041,7 @@ public function testOverrideFeedbackStyleFromHelperConfigViaControlConfig() ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group text is-invalid']], + ['div' => ['class' => 'mb-3 text is-invalid']], ['label' => ['class' => 'form-label', 'for' => 'title']], 'Title', '/label', @@ -1077,7 +1077,7 @@ public function testFormGroupPositionFromHelperConfig() $result = $this->Form->control('title'); $expected = [ - ['div' => ['class' => 'mb-3 form-group position-absolute text is-invalid']], + ['div' => ['class' => 'mb-3 position-absolute text is-invalid']], ['label' => ['class' => 'form-label', 'for' => 'title']], 'Title', '/label', @@ -1115,7 +1115,7 @@ public function testOverrideFormGroupPositionFromHelperConfigViaControlConfig() ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group position-static text is-invalid']], + ['div' => ['class' => 'mb-3 position-static text is-invalid']], ['label' => ['class' => 'form-label', 'for' => 'title']], 'Title', '/label', @@ -1149,7 +1149,7 @@ public function testDefaultAlignControlWithTooltipFeedbackStyle() ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group position-relative text is-invalid']], + ['div' => ['class' => 'mb-3 position-relative text is-invalid']], ['label' => ['class' => 'form-label', 'for' => 'title']], 'Title', '/label', @@ -1186,7 +1186,7 @@ public function testInlineAlignControlWithDefaultFeedbackStyle() $expected = [ ['div' => ['class' => 'col-auto']], - ['div' => ['class' => 'form-group text is-invalid']], + ['div' => ['class' => 'text is-invalid']], ['label' => ['class' => 'form-label visually-hidden', 'for' => 'title']], 'Title', '/label', @@ -1228,7 +1228,7 @@ public function testHorizontalAlignControlWithTooltipFeedbackStyle() ]); $expected = [ - ['div' => ['class' => 'mb-3 form-group row position-relative text is-invalid']], + ['div' => ['class' => 'mb-3 row position-relative text is-invalid']], ['label' => ['class' => 'col-form-label col-sm-5', 'for' => 'title']], 'Title', '/label', @@ -1287,7 +1287,7 @@ public function testOverrideAriaAttributes() 'aria-describedby' => 'custom', ]); $expected = [ - 'div' => ['class' => 'mb-3 form-group text required is-invalid'], + 'div' => ['class' => 'mb-3 text required is-invalid'], ['label' => ['class' => 'form-label', 'for' => 'title']], 'Title', '/label', @@ -1323,7 +1323,7 @@ public function testPartiallyOverrideAriaAttributes() 'aria-describedby' => 'custom', ]); $expected = [ - 'div' => ['class' => 'mb-3 form-group text required is-invalid'], + 'div' => ['class' => 'mb-3 text required is-invalid'], ['label' => ['class' => 'form-label', 'for' => 'title']], 'Title', '/label', @@ -1357,7 +1357,7 @@ public function testSpacingViaCreateConfigIsBeingResetOnFormClose() $this->Form->end(); $expected = [ - ['div' => ['class' => 'custom-spacing-create form-group text']], + ['div' => ['class' => 'custom-spacing-create text']], ['label' => ['class' => 'form-label', 'for' => 'title']], 'Title', '/label', @@ -1376,7 +1376,7 @@ public function testSpacingViaCreateConfigIsBeingResetOnFormClose() $this->Form->end(); $expected = [ - ['div' => ['class' => 'mb-3 form-group text']], + ['div' => ['class' => 'mb-3 text']], ['label' => ['class' => 'form-label', 'for' => 'title']], 'Title', '/label', @@ -1404,7 +1404,7 @@ public function testOverrideSpacingFromHelperConfigViaCreateConfig() $this->Form->end(); $expected = [ - ['div' => ['class' => 'custom-spacing-helper form-group text']], + ['div' => ['class' => 'custom-spacing-helper text']], ['label' => ['class' => 'form-label', 'for' => 'title']], 'Title', '/label', @@ -1425,7 +1425,7 @@ public function testOverrideSpacingFromHelperConfigViaCreateConfig() $this->Form->end(); $expected = [ - ['div' => ['class' => 'custom-spacing-create form-group text']], + ['div' => ['class' => 'custom-spacing-create text']], ['label' => ['class' => 'form-label', 'for' => 'title']], 'Title', '/label', @@ -1453,7 +1453,7 @@ public function testOverrideSpacingFromHelperConfigViaControlConfig() $this->Form->end(); $expected = [ - ['div' => ['class' => 'custom-spacing-helper form-group text']], + ['div' => ['class' => 'custom-spacing-helper text']], ['label' => ['class' => 'form-label', 'for' => 'title']], 'Title', '/label', @@ -1474,7 +1474,7 @@ public function testOverrideSpacingFromHelperConfigViaControlConfig() $this->Form->end(); $expected = [ - ['div' => ['class' => 'custom-spacing-control form-group text']], + ['div' => ['class' => 'custom-spacing-control text']], ['label' => ['class' => 'form-label', 'for' => 'title']], 'Title', '/label', @@ -1499,7 +1499,7 @@ public function testOverrideSpacingFromCreateConfigViaControlConfig() $result = $this->Form->control('title'); $expected = [ - ['div' => ['class' => 'custom-spacing-create form-group text']], + ['div' => ['class' => 'custom-spacing-create text']], ['label' => ['class' => 'form-label', 'for' => 'title']], 'Title', '/label', @@ -1517,7 +1517,7 @@ public function testOverrideSpacingFromCreateConfigViaControlConfig() 'spacing' => 'custom-spacing-control', ]); $expected = [ - ['div' => ['class' => 'custom-spacing-control form-group text']], + ['div' => ['class' => 'custom-spacing-control text']], ['label' => ['class' => 'form-label', 'for' => 'title']], 'Title', '/label', @@ -1543,7 +1543,7 @@ public function testDisableSpacingViaHelperConfig() $this->Form->end(); $expected = [ - ['div' => ['class' => 'mb-3 form-group text']], + ['div' => ['class' => 'mb-3 text']], ['label' => ['class' => 'form-label', 'for' => 'title']], 'Title', '/label', @@ -1566,7 +1566,7 @@ public function testDisableSpacingViaHelperConfig() $this->Form->end(); $expected = [ - ['div' => ['class' => 'form-group text']], + ['div' => ['class' => 'text']], ['label' => ['class' => 'form-label', 'for' => 'title']], 'Title', '/label', @@ -1594,7 +1594,7 @@ public function testDisableSpacingFromHelperConfigViaCreateConfig() $this->Form->end(); $expected = [ - ['div' => ['class' => 'custom-spacing-helper form-group text']], + ['div' => ['class' => 'custom-spacing-helper text']], ['label' => ['class' => 'form-label', 'for' => 'title']], 'Title', '/label', @@ -1615,7 +1615,7 @@ public function testDisableSpacingFromHelperConfigViaCreateConfig() $this->Form->end(); $expected = [ - ['div' => ['class' => 'form-group text']], + ['div' => ['class' => 'text']], ['label' => ['class' => 'form-label', 'for' => 'title']], 'Title', '/label', @@ -1643,7 +1643,7 @@ public function testDisableSpacingFromHelperConfigViaControlConfig() $this->Form->end(); $expected = [ - ['div' => ['class' => 'custom-spacing-helper form-group text']], + ['div' => ['class' => 'custom-spacing-helper text']], ['label' => ['class' => 'form-label', 'for' => 'title']], 'Title', '/label', @@ -1664,7 +1664,7 @@ public function testDisableSpacingFromHelperConfigViaControlConfig() $this->Form->end(); $expected = [ - ['div' => ['class' => 'form-group text']], + ['div' => ['class' => 'text']], ['label' => ['class' => 'form-label', 'for' => 'title']], 'Title', '/label', @@ -1689,7 +1689,7 @@ public function testDisableSpacingFromCreateConfigViaControlConfig() $result = $this->Form->control('title'); $expected = [ - ['div' => ['class' => 'custom-spacing-create form-group text']], + ['div' => ['class' => 'custom-spacing-create text']], ['label' => ['class' => 'form-label', 'for' => 'title']], 'Title', '/label', @@ -1707,7 +1707,7 @@ public function testDisableSpacingFromCreateConfigViaControlConfig() 'spacing' => false, ]); $expected = [ - ['div' => ['class' => 'form-group text']], + ['div' => ['class' => 'text']], ['label' => ['class' => 'form-label', 'for' => 'title']], 'Title', '/label', @@ -1735,7 +1735,7 @@ public function testFloatingLabelPlaceholderGeneration() ], ]); $expected = [ - 'div' => ['class' => 'mb-3 form-floating form-group text'], + 'div' => ['class' => 'mb-3 form-floating text'], 'input' => [ 'type' => 'text', 'name' => 'title', @@ -1761,7 +1761,7 @@ public function testFloatingLabelPlaceholderGenerationForNestedField() ], ]); $expected = [ - 'div' => ['class' => 'mb-3 form-floating form-group text'], + 'div' => ['class' => 'mb-3 form-floating text'], 'input' => [ 'type' => 'text', 'name' => 'author[name]', @@ -1789,7 +1789,7 @@ public function testFloatingLabelPlaceholderGenerationForIdField() ], ]); $expected = [ - 'div' => ['class' => 'mb-3 form-floating form-group text'], + 'div' => ['class' => 'mb-3 form-floating text'], 'input' => [ 'type' => 'text', 'name' => 'author_id', @@ -1804,56 +1804,4 @@ public function testFloatingLabelPlaceholderGenerationForIdField() ]; $this->assertHtml($expected, $result); } - - public function testFormGroupClassOverride() - { - $this->article['required']['title'] = false; - $this->Form->create($this->article); - - $result = $this->Form->control('title', [ - 'container' => [ - 'formGroupClass' => 'custom-form-group', - ], - ]); - $expected = [ - ['div' => ['class' => 'mb-3 custom-form-group text']], - ['label' => ['class' => 'form-label', 'for' => 'title']], - 'Title', - '/label', - 'input' => [ - 'type' => 'text', - 'name' => 'title', - 'id' => 'title', - 'class' => 'form-control', - ], - '/div', - ]; - $this->assertHtml($expected, $result); - } - - public function testFormGroupClassEmpty() - { - $this->article['required']['title'] = false; - $this->Form->create($this->article); - - $result = $this->Form->control('title', [ - 'container' => [ - 'formGroupClass' => '', - ], - ]); - $expected = [ - ['div' => ['class' => 'mb-3 text']], - ['label' => ['class' => 'form-label', 'for' => 'title']], - 'Title', - '/label', - 'input' => [ - 'type' => 'text', - 'name' => 'title', - 'id' => 'title', - 'class' => 'form-control', - ], - '/div', - ]; - $this->assertHtml($expected, $result); - } } diff --git a/tests/test_app/config/custom_templates.php b/tests/test_app/config/custom_templates.php index 98bad7fe..ac8e4234 100644 --- a/tests/test_app/config/custom_templates.php +++ b/tests/test_app/config/custom_templates.php @@ -1,4 +1,4 @@ '
{{content}}{{help}}
', + 'inputContainer' => '
{{content}}{{help}}
', ]; From 814969d5cc66983a7ea01c2928c116609138196f Mon Sep 17 00:00:00 2001 From: ADmad Date: Sat, 30 Nov 2024 01:20:15 +0530 Subject: [PATCH 2/2] Remove usage of "form-horizonal" and "form-inline" classes. They don't exist in Bootstrap 5 --- src/View/Helper/FormHelper.php | 2 -- tests/TestCase/View/Helper/FormHelperTest.php | 6 ++---- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/src/View/Helper/FormHelper.php b/src/View/Helper/FormHelper.php index be7582a8..bfe99be1 100644 --- a/src/View/Helper/FormHelper.php +++ b/src/View/Helper/FormHelper.php @@ -1284,8 +1284,6 @@ protected function _processFormOptions(array $options): array return $options; } - $options = $this->injectClasses('form-' . $this->_align, $options); - if ($this->_align === static::ALIGN_INLINE) { $options = $this->injectClasses( [ diff --git a/tests/TestCase/View/Helper/FormHelperTest.php b/tests/TestCase/View/Helper/FormHelperTest.php index e1ef9bd8..f02b1f00 100644 --- a/tests/TestCase/View/Helper/FormHelperTest.php +++ b/tests/TestCase/View/Helper/FormHelperTest.php @@ -641,7 +641,7 @@ public function testInlineFormCreate() 'method' => 'post', 'accept-charset' => 'utf-8', 'action' => '/articles/add', - 'class' => 'form-inline row g-3 align-items-center', + 'class' => 'row g-3 align-items-center', ], ]; $this->assertHtml($expected, $result); @@ -658,7 +658,7 @@ public function testInlineFormCreateWithCustomSpacing() 'method' => 'post', 'accept-charset' => 'utf-8', 'action' => '/articles/add', - 'class' => 'form-inline row custom-spacing align-items-center', + 'class' => 'row custom-spacing align-items-center', ], ]; $this->assertHtml($expected, $result); @@ -672,7 +672,6 @@ public function testHorizontalFormCreate() 'method' => 'post', 'accept-charset' => 'utf-8', 'action' => '/articles/add', - 'class' => 'form-horizontal', ], ]; $this->assertHtml($expected, $result); @@ -770,7 +769,6 @@ public function testHorizontalFormCreateFromConfig() 'method' => 'post', 'accept-charset' => 'utf-8', 'action' => '/articles/add', - 'class' => 'form-horizontal', ], ]; $this->assertHtml($expected, $result);