php-ext-xlswriter/tests/013.phpt

28 lines
567 B
Plaintext
Raw Normal View History

2024-03-05 10:01:08 +08:00
--TEST--
Check for vtiful presence
--SKIPIF--
<?php if (!extension_loaded("xlswriter")) print "skip"; ?>
--FILE--
<?php
$config = ['path' => './tests'];
$excel = new \Vtiful\Kernel\Excel($config);
$textFile = $excel->fileName("13.xlsx")
->header(['name', 'age']);
for ($index = 0; $index < 10; $index++) {
$textFile->insertText($index+1, 0, 'vikin');
$textFile->insertText($index+1, 1, 1000, '#,##0');
}
$filePath = $textFile->output();
var_dump($filePath);
?>
--CLEAN--
<?php
@unlink(__DIR__ . '/13.xlsx');
?>
--EXPECT--
string(15) "./tests/13.xlsx"