You are here

public function HTMLExporterTest::testCSSColumnClasses in Loft Data Grids 7.2

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

File

vendor/aklump/loft_data_grids/tests/phpunit/HTMLTableTest.php, line 15
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());
}