diff --git a/tests/TestCase/View/Helper/FormHelperTest.php b/tests/TestCase/View/Helper/FormHelperTest.php index 3375584a36c..b9fc17aaa8f 100644 --- a/tests/TestCase/View/Helper/FormHelperTest.php +++ b/tests/TestCase/View/Helper/FormHelperTest.php @@ -8502,6 +8502,7 @@ public function testNestedLabelInput() * * This test makes sure `false` excludes the label from the render * + * @return void */ public function testInputLabelManipulationDisableLabels() { @@ -8556,6 +8557,8 @@ public function testInputLabelManipulationDisableLabels() * added to the class if checked. * * Also checks to make sure any custom attributes are rendered correctly + * + * @return void */ public function testInputLabelManipulationRadios() { @@ -8664,6 +8667,8 @@ public function testInputLabelManipulationRadios() * added to the class if checked. * * Also checks to make sure any custom attributes are rendered correctly + * + * @return void */ public function testInputLabelManipulationCheckboxes() { diff --git a/tests/TestCase/View/StringTemplateTest.php b/tests/TestCase/View/StringTemplateTest.php index f59349d0eaa..f4ddd5e9913 100644 --- a/tests/TestCase/View/StringTemplateTest.php +++ b/tests/TestCase/View/StringTemplateTest.php @@ -305,18 +305,23 @@ public function testPushPopTemplates() * Test addClass method newClass parameter * * Tests null, string, array and false for `input` + * + * @return void */ public function testAddClassMethodNewClass() { - // Test new class as null, string, array, false etc $result = $this->template->addClass([], 'new_class'); $this->assertEquals($result, ['class' => ['new_class']]); + $result = $this->template->addClass([], ['new_class']); $this->assertEquals($result, ['class' => ['new_class']]); + $result = $this->template->addClass([], false); $this->assertEquals($result, []); + $result = $this->template->addClass([], null); $this->assertEquals($result, []); + $result = $this->template->addClass(null, null); $this->assertNull($result); } @@ -325,23 +330,31 @@ public function testAddClassMethodNewClass() * Test addClass method input (currentClass) parameter * * Tests null, string, array, false and object + * + * @return void */ public function testAddClassMethodCurrentClass() { $result = $this->template->addClass(['class' => ['current']], 'new_class'); $this->assertEquals($result, ['class' => ['current', 'new_class']]); + $result = $this->template->addClass('', 'new_class'); $this->assertEquals($result, ['class' => ['new_class']]); + $result = $this->template->addClass(null, 'new_class'); $this->assertEquals($result, ['class' => ['new_class']]); + $result = $this->template->addClass(false, 'new_class'); $this->assertEquals($result, ['class' => ['new_class']]); + $result = $this->template->addClass(new \StdClass(), 'new_class'); $this->assertEquals($result, ['class' => ['new_class']]); } /** * Test addClass method string parameter, it should fallback to string + * + * @return void */ public function testAddClassMethodFallbackToString() { @@ -351,6 +364,8 @@ public function testAddClassMethodFallbackToString() /** * Test addClass method to make sure the returned array is unique + * + * @return void */ public function testAddClassMethodUnique() { @@ -362,6 +377,8 @@ public function testAddClassMethodUnique() * Test addClass method useIndex param * * Tests for useIndex being the default, 'my_class' and false + * + * @return void */ public function testAddClassMethodUseIndex() {