Skip to content

Commit dbca5e2

Browse files
committed
Tidy up test cases.
1 parent b138621 commit dbca5e2

File tree

2 files changed

+23
-1
lines changed

2 files changed

+23
-1
lines changed

tests/TestCase/View/Helper/FormHelperTest.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8502,6 +8502,7 @@ public function testNestedLabelInput()
85028502
*
85038503
* This test makes sure `false` excludes the label from the render
85048504
*
8505+
* @return void
85058506
*/
85068507
public function testInputLabelManipulationDisableLabels()
85078508
{
@@ -8556,6 +8557,8 @@ public function testInputLabelManipulationDisableLabels()
85568557
* added to the class if checked.
85578558
*
85588559
* Also checks to make sure any custom attributes are rendered correctly
8560+
*
8561+
* @return void
85598562
*/
85608563
public function testInputLabelManipulationRadios()
85618564
{
@@ -8664,6 +8667,8 @@ public function testInputLabelManipulationRadios()
86648667
* added to the class if checked.
86658668
*
86668669
* Also checks to make sure any custom attributes are rendered correctly
8670+
*
8671+
* @return void
86678672
*/
86688673
public function testInputLabelManipulationCheckboxes()
86698674
{

tests/TestCase/View/StringTemplateTest.php

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,18 +305,23 @@ public function testPushPopTemplates()
305305
* Test addClass method newClass parameter
306306
*
307307
* Tests null, string, array and false for `input`
308+
*
309+
* @return void
308310
*/
309311
public function testAddClassMethodNewClass()
310312
{
311-
// Test new class as null, string, array, false etc
312313
$result = $this->template->addClass([], 'new_class');
313314
$this->assertEquals($result, ['class' => ['new_class']]);
315+
314316
$result = $this->template->addClass([], ['new_class']);
315317
$this->assertEquals($result, ['class' => ['new_class']]);
318+
316319
$result = $this->template->addClass([], false);
317320
$this->assertEquals($result, []);
321+
318322
$result = $this->template->addClass([], null);
319323
$this->assertEquals($result, []);
324+
320325
$result = $this->template->addClass(null, null);
321326
$this->assertNull($result);
322327
}
@@ -325,23 +330,31 @@ public function testAddClassMethodNewClass()
325330
* Test addClass method input (currentClass) parameter
326331
*
327332
* Tests null, string, array, false and object
333+
*
334+
* @return void
328335
*/
329336
public function testAddClassMethodCurrentClass()
330337
{
331338
$result = $this->template->addClass(['class' => ['current']], 'new_class');
332339
$this->assertEquals($result, ['class' => ['current', 'new_class']]);
340+
333341
$result = $this->template->addClass('', 'new_class');
334342
$this->assertEquals($result, ['class' => ['new_class']]);
343+
335344
$result = $this->template->addClass(null, 'new_class');
336345
$this->assertEquals($result, ['class' => ['new_class']]);
346+
337347
$result = $this->template->addClass(false, 'new_class');
338348
$this->assertEquals($result, ['class' => ['new_class']]);
349+
339350
$result = $this->template->addClass(new \StdClass(), 'new_class');
340351
$this->assertEquals($result, ['class' => ['new_class']]);
341352
}
342353

343354
/**
344355
* Test addClass method string parameter, it should fallback to string
356+
*
357+
* @return void
345358
*/
346359
public function testAddClassMethodFallbackToString()
347360
{
@@ -351,6 +364,8 @@ public function testAddClassMethodFallbackToString()
351364

352365
/**
353366
* Test addClass method to make sure the returned array is unique
367+
*
368+
* @return void
354369
*/
355370
public function testAddClassMethodUnique()
356371
{
@@ -362,6 +377,8 @@ public function testAddClassMethodUnique()
362377
* Test addClass method useIndex param
363378
*
364379
* Tests for useIndex being the default, 'my_class' and false
380+
*
381+
* @return void
365382
*/
366383
public function testAddClassMethodUseIndex()
367384
{

0 commit comments

Comments
 (0)