function CSVExporterTest::testGetSetCurrent in Loft Data Grids 7.2
Same name and namespace in other branches
- 6.2 vendor/aklump/loft_data_grids/tests/CSVExporterTest.php \AKlump\LoftDataGrids\CSVExporterTest::testGetSetCurrent()
File
- vendor/
aklump/ loft_data_grids/ tests/ phpunit/ CSVExporterTest.php, line 90 - Tests for the CSVExporter class
Class
Namespace
AKlump\LoftDataGridsCode
function testGetSetCurrent() {
$obj = $this->exporter;
$obj
->getData()
->setPointer(1);
$this
->assertNull($obj
->getData()
->getCurrent('Order No.'));
$return = $obj
->getData()
->setPointer(0);
$this
->assertInstanceOf('AKlump\\LoftDataGrids\\ExportData', $return);
$this
->assertEquals(1181, $obj
->getData()
->getCurrent('Order No.'));
$this
->assertEquals(0, $obj
->getData()
->getCurrent('California Taxed Purchase Amount'));
// Try setting the value of the California Taxed Purchase Amount
$return = $obj
->getData()
->add('California Taxed Purchase Amount', 25.95);
$this
->assertInstanceOf('AKlump\\LoftDataGrids\\ExportData', $return);
$this
->assertEquals(25.95, $obj
->getData()
->getCurrent('California Taxed Purchase Amount'));
}