mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-19 11:06:15 +00:00
Increasing testTableHeaders case
This commit is contained in:
parent
c65d4318cf
commit
fad7b0705f
1 changed files with 12 additions and 0 deletions
|
@ -1505,6 +1505,18 @@ class HtmlHelperTest extends CakeTestCase {
|
|||
$result = $this->Html->tableHeaders(array('ID', 'Name', 'Date'));
|
||||
$expected = array('<tr', '<th', 'ID', '/th', '<th', 'Name', '/th', '<th', 'Date', '/th', '/tr');
|
||||
$this->assertTags($result, $expected);
|
||||
|
||||
$result = $this->Html->tableHeaders(array('ID', array('Name' => array('class' => 'highlight')), 'Date'));
|
||||
$expected = array('<tr', '<th', 'ID', '/th', '<th class="highlight"', 'Name', '/th', '<th', 'Date', '/th', '/tr');
|
||||
$this->assertTags($result, $expected);
|
||||
|
||||
$result = $this->Html->tableHeaders(array('ID', array('Name' => array('class' => 'highlight', 'width' => '120px')), 'Date'));
|
||||
$expected = array('<tr', '<th', 'ID', '/th', '<th class="highlight" width="120px"', 'Name', '/th', '<th', 'Date', '/th', '/tr');
|
||||
$this->assertTags($result, $expected);
|
||||
|
||||
$result = $this->Html->tableHeaders(array('ID', array('Name' => array()), 'Date'));
|
||||
$expected = array('<tr', '<th', 'ID', '/th', '<th', 'Name', '/th', '<th', 'Date', '/th', '/tr');
|
||||
$this->assertTags($result, $expected);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Reference in a new issue