function CSVExporterTest::testColumnNumberFormat in Loft Data Grids 6.2
Same name and namespace in other branches
- 7.2 vendor/aklump/loft_data_grids/tests/phpunit/CSVExporterTest.php \AKlump\LoftDataGrids\CSVExporterTest::testColumnNumberFormat()
File
- vendor/
aklump/ loft_data_grids/ tests/ CSVExporterTest.php, line 48 - Tests for the CSVExporter class
Class
Namespace
AKlump\LoftDataGridsCode
function testColumnNumberFormat() {
$obj = $this->exporter;
$currency = 'USD';
$obj
->formatColumn('California Taxed Purchase Amount', $currency);
$obj
->formatColumn('Domestic Purchase Amount', $currency);
$record = $obj
->getData()
->setPage(0)
->setPointer(0);
$data = $record
->getCurrent();
$this
->assertSame('$0.00', $data['California Taxed Purchase Amount']);
$this
->assertSame('$20.00', $data['Domestic Purchase Amount']);
}