New timestamp field should respect existing style for variable names

This commit is contained in:
Alexey Kopytko 2016-06-16 11:06:38 +09:00
parent 85e4049be9
commit 22c7e1705f
2 changed files with 5 additions and 5 deletions

View File

@ -166,7 +166,7 @@ class Spreadsheet_Excel_Writer_Workbook extends Spreadsheet_Excel_Writer_BIFFwri
var $_string_sizeinfo_size; var $_string_sizeinfo_size;
/** @var int */ /** @var int */
public $timestamp; var $_timestamp;
/** /**
* Class constructor * Class constructor
@ -203,7 +203,7 @@ class Spreadsheet_Excel_Writer_Workbook extends Spreadsheet_Excel_Writer_BIFFwri
$this->_str_total = 0; $this->_str_total = 0;
$this->_str_unique = 0; $this->_str_unique = 0;
$this->_str_table = array(); $this->_str_table = array();
$this->timestamp = time(); $this->_timestamp = time();
$this->_setPaletteXl97(); $this->_setPaletteXl97();
} }
@ -595,7 +595,7 @@ class Spreadsheet_Excel_Writer_Workbook extends Spreadsheet_Excel_Writer_BIFFwri
} }
} }
$root = new OLE_PPS_Root($this->timestamp, $this->timestamp, array($OLE)); $root = new OLE_PPS_Root($this->_timestamp, $this->_timestamp, array($OLE));
if ($this->_tmp_dir != '') { if ($this->_tmp_dir != '') {
$root->setTempDir($this->_tmp_dir); $root->setTempDir($this->_tmp_dir);
} }

View File

@ -20,10 +20,10 @@ class Test_Spreadsheet_Excel_WriterTestCase extends PHPUnit_Framework_TestCase
protected function assertSameAsInFixture($filename, Spreadsheet_Excel_Writer $workbook) protected function assertSameAsInFixture($filename, Spreadsheet_Excel_Writer $workbook)
{ {
$this->assertEmpty($workbook->fileName, "Testing with fixtures works only for standard output"); $this->assertEmpty($workbook->_filename, "Testing with fixtures works only for standard output");
// we have to fix timestamp for fixtures to work // we have to fix timestamp for fixtures to work
$workbook->timestamp = 1000000000; // somewhere in 2001 $workbook->_timestamp = 1000000000; // somewhere in 2001
ob_start(); ob_start();
$workbook->close(); $workbook->close();