You are here

public function HTMLExporterTest::testCSSColumnClasses in Loft Data Grids 6.2

Same name and namespace in other branches
  1. 7.2 vendor/aklump/loft_data_grids/tests/phpunit/HTMLTableTest.php \AKlump\LoftDataGrids\HTMLExporterTest::testCSSColumnClasses()

File

vendor/aklump/loft_data_grids/tests/HTMLTableTest.php, line 14
Tests for the HTMLExporter class

Class

HTMLExporterTest

Namespace

AKlump\LoftDataGrids

Code

public function testCSSColumnClasses() {
  $obj = new ExportData();
  $obj
    ->add('Vivid Color', 'orange')
    ->add('Definitive_SHAPE', 'rectangle');
  $export = new HTMLExporter($obj);
  $control = '<table>
<thead>
<tr><td class="colgroup-vivid-color">Vivid Color</th><td class="colgroup-definitive-shape">Definitive_SHAPE</th></tr>
</thead>
<tbody>
<tr><td class="colgroup-vivid-color">orange</td><td class="colgroup-definitive-shape">rectangle</td></tr>
</tbody>
</table>
';
  $this
    ->assertSame($control, $export
    ->export());
}