Skip to content

Commit b2dc243

Browse files
authored
Merge pull request #6572 from ddevsr/test-table-coverage
tests: increase coverage `TableTest`
2 parents 83fc0f9 + 0db6009 commit b2dc243

1 file changed

Lines changed: 17 additions & 3 deletions

File tree

tests/system/View/TableTest.php

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -392,9 +392,18 @@ public function testGenerate()
392392
'Small',
393393
],
394394
[
395-
'Mary',
396-
'Red',
397-
'Large',
395+
[
396+
'data' => 'Mary',
397+
'class' => 'cssMary',
398+
],
399+
[
400+
'data' => 'Red',
401+
'class' => 'cssRed',
402+
],
403+
[
404+
'data' => 'Large',
405+
'class' => 'cssLarge',
406+
],
398407
],
399408
[
400409
'John',
@@ -421,6 +430,11 @@ public function testGenerate()
421430
$this->assertStringContainsString('<td>Blue</td>', $table);
422431
$this->assertStringContainsString('<td>Small</td>', $table);
423432

433+
// Test entry with attribute
434+
$this->assertStringContainsString('<td class="cssMary">Mary</td>', $table);
435+
$this->assertStringContainsString('<td class="cssRed">Red</td>', $table);
436+
$this->assertStringContainsString('<td class="cssLarge">Large</td>', $table);
437+
424438
// Check for the caption
425439
$this->assertStringContainsString('<caption>Awesome table</caption>', $table);
426440

0 commit comments

Comments
 (0)