php-ext-xlswriter/tests/open_xlsx_get_data.phpt

35 lines
609 B
PHP

--TEST--
Check for vtiful presence
--SKIPIF--
<?php
require __DIR__ . '/include/skipif.inc';
skip_disable_reader();
?>
--FILE--
<?php
$config = ['path' => './tests'];
$excel = new \Vtiful\Kernel\Excel($config);
$filePath = $excel->fileName('open_xlsx_get_data.xlsx')
->header(['Item', 'Cost'])
->output();
$data = $excel->openFile('open_xlsx_get_data.xlsx')
->openSheet()
->getSheetData();
var_dump($data);
?>
--CLEAN--
<?php
@unlink(__DIR__ . '/open_xlsx_get_data.xlsx');
?>
--EXPECT--
array(1) {
[0]=>
array(2) {
[0]=>
string(4) "Item"
[1]=>
string(4) "Cost"
}
}