30 lines
583 B
PHP
30 lines
583 B
PHP
--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('protection_password.xlsx');
|
|
|
|
$filePath = $fileObject->header(['name', 'age'])
|
|
->data([
|
|
['viest', 21],
|
|
['wjx', 21]
|
|
])
|
|
->protection('password')
|
|
->output();
|
|
|
|
var_dump($filePath);
|
|
?>
|
|
--CLEAN--
|
|
<?php
|
|
@unlink(__DIR__ . '/protection_password.xlsx');
|
|
?>
|
|
--EXPECT--
|
|
string(32) "./tests/protection_password.xlsx"
|