You are here

public function YAMLFrontMatterExporterTest::testExportNoBody in Loft Data Grids 7.2

File

vendor/aklump/loft_data_grids/tests/phpunit/YAMLFrontMatterExporterTest.php, line 27
Tests for the YAMLFrontMatterExporter class

Class

YAMLFrontMatterExporterTest

Namespace

AKlump\LoftDataGrids

Code

public function testExportNoBody() {
  $html = new ExportData();
  $html
    ->add('title', 'YAML Front Matter')
    ->add('description', 'A very simple way to add structured data to a page.');
  $exporter = new YAMLFrontMatterExporter($html);
  $control = '---
title: \'YAML Front Matter\'
description: \'A very simple way to add structured data to a page.\'
---
';
  $this
    ->assertSame($control, $exporter
    ->export());
}