public function testLocations() { $obj = $this->obj; // This is null because page 2 doesn't have a Name column $this->assertNull($obj->getCurrent('Name')); // This is null because we're on row 2 $this->assertNull($obj->getCurrent('Color')); $return = $obj->setPointer(1)->getCurrent('Color'); $this->assertSame('White', $return); $obj->storeLocation('cars'); $return = $obj->gotoLocation('start'); $this->assertInstanceOf('AKlump\\LoftDataGrids\\ExportData', $return); $this->assertSame('Hillary', $obj->getCurrent('Name')); $this->assertEquals(0, $obj->getCurrentPageId()); $this->assertEquals(1, $obj->getPointer()); $subject = array('start' => array('page' => 0, 'pointers' => array(0 => 1, 1 => 0)), 'cars' => array('page' => 1, 'pointers' => array(0 => 1, 1 => 1))); $this->assertSame($subject, $locs = $obj->getLocations()); $copy = new ExportData(); $copy->setLocations($locs); $this->assertSame($subject, $copy->getLocations()); }