public function ExporterBase::setUp in Loft Data Grids 7.2
7 calls to ExporterBase::setUp()
- ArrayExporterTest::setUp in vendor/
aklump/ loft_data_grids/ tests/ phpunit/ ArrayExporterTest.php - JSONExporterTest::setUp in vendor/
aklump/ loft_data_grids/ tests/ phpunit/ JSONExporterTest.php - ValuesOnlyExporterTest::setUp in vendor/
aklump/ loft_data_grids/ tests/ phpunit/ ValuesOnlyExporterTest.php - XLSExporterTest::setUp in vendor/
aklump/ loft_data_grids/ tests/ phpunit/ XLSXExporterTest.php - XMLExporterTest::setUp in vendor/
aklump/ loft_data_grids/ tests/ phpunit/ XMLExporterTest.php
7 methods override ExporterBase::setUp()
- ArrayExporterTest::setUp in vendor/
aklump/ loft_data_grids/ tests/ phpunit/ ArrayExporterTest.php - JSONExporterTest::setUp in vendor/
aklump/ loft_data_grids/ tests/ phpunit/ JSONExporterTest.php - ValuesOnlyExporterTest::setUp in vendor/
aklump/ loft_data_grids/ tests/ phpunit/ ValuesOnlyExporterTest.php - XLSExporterTest::setUp in vendor/
aklump/ loft_data_grids/ tests/ phpunit/ XLSXExporterTest.php - XMLExporterTest::setUp in vendor/
aklump/ loft_data_grids/ tests/ phpunit/ XMLExporterTest.php
File
- vendor/
aklump/ loft_data_grids/ tests/ phpunit/ ExporterBase.php, line 103 - Tests for the YamlExporter class
Class
- ExporterBase
- Class ExporterBase
Namespace
AKlump\LoftDataGridsCode
public function setUp() {
$this->data = new ExportData();
$this->records[0] = array(
'Order No.' => 1181,
'Customer Billing Country' => 'US',
'California Taxed Purchase Amount' => 0,
);
$this->records[1] = array(
'Order No.' => '1182',
'Transaction Date' => '11/7/13',
'Customer Name' => 'Hope, Roberta',
);
// Page 1
foreach ($this->records[0] as $key => $value) {
$this->data
->add($key, $value);
}
$this->data
->next();
// Page 2
$this->data
->setPage(1);
foreach ($this->records[1] as $key => $value) {
$this->data
->add($key, $value);
}
$this->data
->next();
// Move pointers back to 0 on all pages; return to page 0
$this->data
->setPage(1);
$this->data
->setPointer(0);
$this->data
->setPage(0);
$this->data
->setPointer(0);
// Create the sandbox directory for saving
$this->sandbox = dirname(__FILE__) . '/../sandbox';
$this
->assertTrue(is_writable($this->sandbox));
}