You are here

public function YAMLFrontMatterImporterTest::testImportWithoutFrontMatter in Loft Data Grids 7.2

File

vendor/aklump/loft_data_grids/tests/phpunit/YAMLFrontMatterImporterTest.php, line 14

Class

YAMLFrontMatterImporterTest

Namespace

AKlump\LoftDataGrids

Code

public function testImportWithoutFrontMatter() {
  $subject = '<h1> {{ title }} </h1>
<p> {{ description }} </p>
Page content here...';
  $obj = new YAMLFrontMatterImporter();
  $data = $obj
    ->import($subject);
  $this
    ->assertInstanceOf('AKlump\\LoftDataGrids\\ExportData', $data);
  $this
    ->assertSame($subject, $data
    ->getValue('body'));
}