You are here

public function JSONExporterTest::testPrunePage in Loft Data Grids 7.2

File

vendor/aklump/loft_data_grids/tests/phpunit/JSONExporterTest.php, line 27
Tests for the JSONExporter class

Class

JSONExporterTest

Namespace

AKlump\LoftDataGrids

Code

public function testPrunePage() {
  $obj = clone $this->exporter;
  $obj
    ->addSetting('prune', true);
  $data = new ExportData();
  $data
    ->add('name', 'Bob');
  $this
    ->assertSame('{"name":"Bob"}', $obj
    ->setData($data)
    ->export());
}