public function YAMLFrontMatterExporterTest::testExport in Loft Data Grids 7.2
File
- vendor/
aklump/ loft_data_grids/ tests/ phpunit/ YAMLFrontMatterExporterTest.php, line 42 - Tests for the YAMLFrontMatterExporter class
Class
Namespace
AKlump\LoftDataGridsCode
public function testExport() {
$html = new ExportData();
$html
->add('title', 'YAML Front Matter')
->add('description', 'A very simple way to add structured data to a page.')
->add('body', '<h1> {{ title }} </h1>
<p> {{ description }} </p>
Page content here...');
$exporter = new YAMLFrontMatterExporter($html);
$control = '---
title: \'YAML Front Matter\'
description: \'A very simple way to add structured data to a page.\'
---
<h1> {{ title }} </h1>
<p> {{ description }} </p>
Page content here...';
$this
->assertSame($control, $exporter
->export());
}