php-ext-xlswriter/tests/chart_style.phpt

30 lines
660 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'];
$fileObject = new \Vtiful\Kernel\Excel($config);
$fileObject = $fileObject->fileName('chart_style.xlsx');
$fileHandle = $fileObject->getHandle();
$chart = new \Vtiful\Kernel\Chart($fileHandle, \Vtiful\Kernel\Chart::CHART_AREA);
$chartResource = $chart
->series('=Sheet1!$B$2:$B$7', '=Sheet1!$A$2:$A$7')
->seriesName('=Sheet1!$B$1')
->style(11)
->toResource();
var_dump($chartResource);
?>
--CLEAN--
<?php
@unlink(__DIR__ . '/chart_style.xlsx');
?>
--EXPECT--
resource(5) of type (xlsx)