You are here

public function ExportDataTest::__construct in Loft Data Grids 6.2

File

vendor/aklump/loft_data_grids/tests/ExportDataTest.php, line 258
Tests for the ExportData class

Class

ExportDataTest

Namespace

AKlump\LoftDataGrids

Code

public function __construct() {
  $this->obj = new ExportData();
  $this->obj
    ->add('Name', 'Aaron')
    ->add('Age', 39)
    ->next();
  $this->obj
    ->add('Name', 'Hillary')
    ->add('Age', 37)
    ->next();
  $this->obj
    ->add('Name', 'Maia')
    ->add('Age', 7)
    ->next();
  $this->obj
    ->setPointer(1);
  $this
    ->assertSame('Hillary', $this->obj
    ->getCurrent('Name'));
  $return = $this->obj
    ->storeLocation('start');
  $this
    ->assertInstanceOf('AKlump\\LoftDataGrids\\ExportData', $return);
  $this->obj
    ->setPage(1);
  $this->obj
    ->add('Color', 'Black')
    ->add('Make', 'Subaru')
    ->next();
  $this->obj
    ->add('Color', 'White')
    ->add('Make', 'Hyundai')
    ->next();
}