PSR2 Fixes
This commit is contained in:
parent
1d842ed218
commit
09352e3e80
|
@ -387,7 +387,8 @@ class PHPExcel_Reader_CSV extends PHPExcel_Reader_Abstract implements PHPExcel_R
|
||||||
*
|
*
|
||||||
* @return boolean
|
* @return boolean
|
||||||
*/
|
*/
|
||||||
public function getContiguous(){
|
public function getContiguous()
|
||||||
|
{
|
||||||
return $this->_contiguous;
|
return $this->_contiguous;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -998,16 +998,14 @@ class PHPExcel_Reader_Excel2007 extends PHPExcel_Reader_Abstract implements PHPE
|
||||||
// Standard filters are always an OR join, so no join rule needs to be set
|
// Standard filters are always an OR join, so no join rule needs to be set
|
||||||
// Entries can be either filter elements
|
// Entries can be either filter elements
|
||||||
foreach ($filters->filter as $filterRule) {
|
foreach ($filters->filter as $filterRule) {
|
||||||
$column->createRule()->setRule(
|
// Operator is undefined, but always treated as EQUAL
|
||||||
null,// Operator is undefined, but always treated as EQUAL
|
$column->createRule()->setRule(null, (string) $filterRule["val"])->setRuleType(PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_RULETYPE_FILTER);
|
||||||
(string) $filterRule["val"]
|
|
||||||
)
|
|
||||||
->setRuleType(PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_RULETYPE_FILTER);
|
|
||||||
}
|
}
|
||||||
// Or Date Group elements
|
// Or Date Group elements
|
||||||
foreach ($filters->dateGroupItem as $dateGroupItem) {
|
foreach ($filters->dateGroupItem as $dateGroupItem) {
|
||||||
$column->createRule()->setRule(
|
$column->createRule()->setRule(
|
||||||
null,// Operator is undefined, but always treated as EQUAL
|
// Operator is undefined, but always treated as EQUAL
|
||||||
|
null,
|
||||||
array(
|
array(
|
||||||
'year' => (string) $dateGroupItem["year"],
|
'year' => (string) $dateGroupItem["year"],
|
||||||
'month' => (string) $dateGroupItem["month"],
|
'month' => (string) $dateGroupItem["month"],
|
||||||
|
@ -1044,7 +1042,8 @@ class PHPExcel_Reader_Excel2007 extends PHPExcel_Reader_Abstract implements PHPE
|
||||||
// We should only ever have one dynamic filter
|
// We should only ever have one dynamic filter
|
||||||
foreach ($filterColumn->dynamicFilter as $filterRule) {
|
foreach ($filterColumn->dynamicFilter as $filterRule) {
|
||||||
$column->createRule()->setRule(
|
$column->createRule()->setRule(
|
||||||
null,// Operator is undefined, but always treated as EQUAL
|
// Operator is undefined, but always treated as EQUAL
|
||||||
|
null,
|
||||||
(string) $filterRule["val"],
|
(string) $filterRule["val"],
|
||||||
(string) $filterRule["type"]
|
(string) $filterRule["type"]
|
||||||
)
|
)
|
||||||
|
|
|
@ -559,7 +559,6 @@ class PHPExcel_Reader_Excel5 extends PHPExcel_Reader_Abstract implements PHPExce
|
||||||
|
|
||||||
// Parse the individual sheets
|
// Parse the individual sheets
|
||||||
foreach ($this->_sheets as $sheet) {
|
foreach ($this->_sheets as $sheet) {
|
||||||
|
|
||||||
if ($sheet['sheetType'] != 0x00) {
|
if ($sheet['sheetType'] != 0x00) {
|
||||||
// 0x00: Worksheet
|
// 0x00: Worksheet
|
||||||
// 0x02: Chart
|
// 0x02: Chart
|
||||||
|
@ -1185,7 +1184,6 @@ class PHPExcel_Reader_Excel5 extends PHPExcel_Reader_Abstract implements PHPExce
|
||||||
$explodes = explode('!', $range);
|
$explodes = explode('!', $range);
|
||||||
if (count($explodes) == 2) {
|
if (count($explodes) == 2) {
|
||||||
if ($docSheet = $this->_phpExcel->getSheetByName($explodes[0])) {
|
if ($docSheet = $this->_phpExcel->getSheetByName($explodes[0])) {
|
||||||
|
|
||||||
$extractedRange = $explodes[1];
|
$extractedRange = $explodes[1];
|
||||||
$extractedRange = str_replace('$', '', $extractedRange);
|
$extractedRange = str_replace('$', '', $extractedRange);
|
||||||
|
|
||||||
|
@ -1965,12 +1963,16 @@ class PHPExcel_Reader_Excel5 extends PHPExcel_Reader_Abstract implements PHPExce
|
||||||
// bit: 0; mask 0x0001; bold (redundant in BIFF5-BIFF8)
|
// bit: 0; mask 0x0001; bold (redundant in BIFF5-BIFF8)
|
||||||
// bit: 1; mask 0x0002; italic
|
// bit: 1; mask 0x0002; italic
|
||||||
$isItalic = (0x0002 & self::_GetInt2d($recordData, 2)) >> 1;
|
$isItalic = (0x0002 & self::_GetInt2d($recordData, 2)) >> 1;
|
||||||
if ($isItalic) $objFont->setItalic(true);
|
if ($isItalic) {
|
||||||
|
$objFont->setItalic(true);
|
||||||
|
}
|
||||||
|
|
||||||
// bit: 2; mask 0x0004; underlined (redundant in BIFF5-BIFF8)
|
// bit: 2; mask 0x0004; underlined (redundant in BIFF5-BIFF8)
|
||||||
// bit: 3; mask 0x0008; strike
|
// bit: 3; mask 0x0008; strike
|
||||||
$isStrike = (0x0008 & self::_GetInt2d($recordData, 2)) >> 3;
|
$isStrike = (0x0008 & self::_GetInt2d($recordData, 2)) >> 3;
|
||||||
if ($isStrike) $objFont->setStrikethrough(true);
|
if ($isStrike) {
|
||||||
|
$objFont->setStrikethrough(true);
|
||||||
|
}
|
||||||
|
|
||||||
// offset: 4; size: 2; colour index
|
// offset: 4; size: 2; colour index
|
||||||
$colorIndex = self::_GetInt2d($recordData, 4);
|
$colorIndex = self::_GetInt2d($recordData, 4);
|
||||||
|
@ -2891,7 +2893,6 @@ class PHPExcel_Reader_Excel5 extends PHPExcel_Reader_Abstract implements PHPExce
|
||||||
|
|
||||||
// loop through the Unicode strings (16-bit length)
|
// loop through the Unicode strings (16-bit length)
|
||||||
for ($i = 0; $i < $nm; ++$i) {
|
for ($i = 0; $i < $nm; ++$i) {
|
||||||
|
|
||||||
// number of characters in the Unicode string
|
// number of characters in the Unicode string
|
||||||
$numChars = self::_GetInt2d($recordData, $pos);
|
$numChars = self::_GetInt2d($recordData, $pos);
|
||||||
$pos += 2;
|
$pos += 2;
|
||||||
|
@ -3923,21 +3924,18 @@ class PHPExcel_Reader_Excel5 extends PHPExcel_Reader_Abstract implements PHPExce
|
||||||
} elseif ((ord($recordData{6}) == 1)
|
} elseif ((ord($recordData{6}) == 1)
|
||||||
&& (ord($recordData{12}) == 255)
|
&& (ord($recordData{12}) == 255)
|
||||||
&& (ord($recordData{13}) == 255)) {
|
&& (ord($recordData{13}) == 255)) {
|
||||||
|
|
||||||
// Boolean formula. Result is in +2; 0=false, 1=true
|
// Boolean formula. Result is in +2; 0=false, 1=true
|
||||||
$dataType = PHPExcel_Cell_DataType::TYPE_BOOL;
|
$dataType = PHPExcel_Cell_DataType::TYPE_BOOL;
|
||||||
$value = (bool) ord($recordData{8});
|
$value = (bool) ord($recordData{8});
|
||||||
} elseif ((ord($recordData{6}) == 2)
|
} elseif ((ord($recordData{6}) == 2)
|
||||||
&& (ord($recordData{12}) == 255)
|
&& (ord($recordData{12}) == 255)
|
||||||
&& (ord($recordData{13}) == 255)) {
|
&& (ord($recordData{13}) == 255)) {
|
||||||
|
|
||||||
// Error formula. Error code is in +2
|
// Error formula. Error code is in +2
|
||||||
$dataType = PHPExcel_Cell_DataType::TYPE_ERROR;
|
$dataType = PHPExcel_Cell_DataType::TYPE_ERROR;
|
||||||
$value = self::_mapErrorCode(ord($recordData{8}));
|
$value = self::_mapErrorCode(ord($recordData{8}));
|
||||||
} elseif ((ord($recordData{6}) == 3)
|
} elseif ((ord($recordData{6}) == 3)
|
||||||
&& (ord($recordData{12}) == 255)
|
&& (ord($recordData{12}) == 255)
|
||||||
&& (ord($recordData{13}) == 255)) {
|
&& (ord($recordData{13}) == 255)) {
|
||||||
|
|
||||||
// Formula result is a null string
|
// Formula result is a null string
|
||||||
$dataType = PHPExcel_Cell_DataType::TYPE_NULL;
|
$dataType = PHPExcel_Cell_DataType::TYPE_NULL;
|
||||||
$value = '';
|
$value = '';
|
||||||
|
@ -4352,7 +4350,8 @@ class PHPExcel_Reader_Excel5 extends PHPExcel_Reader_Abstract implements PHPExce
|
||||||
/**
|
/**
|
||||||
* Read PLV Record(Created by Excel2007 or upper)
|
* Read PLV Record(Created by Excel2007 or upper)
|
||||||
*/
|
*/
|
||||||
private function _readPageLayoutView() {
|
private function _readPageLayoutView()
|
||||||
|
{
|
||||||
$length = self::_GetInt2d($this->_data, $this->_pos + 2);
|
$length = self::_GetInt2d($this->_data, $this->_pos + 2);
|
||||||
$recordData = $this->_readRecordData($this->_data, $this->_pos + 4, $length);
|
$recordData = $this->_readRecordData($this->_data, $this->_pos + 4, $length);
|
||||||
|
|
||||||
|
@ -4620,8 +4619,9 @@ class PHPExcel_Reader_Excel5 extends PHPExcel_Reader_Abstract implements PHPExce
|
||||||
// offset: var; size: $us; character array of the URL, no Unicode string header, always 16-bit characters, zero-terminated
|
// offset: var; size: $us; character array of the URL, no Unicode string header, always 16-bit characters, zero-terminated
|
||||||
$url = self::_encodeUTF16(substr($recordData, $offset, $us - 2), false);
|
$url = self::_encodeUTF16(substr($recordData, $offset, $us - 2), false);
|
||||||
$nullOffset = strpos($url, 0x00);
|
$nullOffset = strpos($url, 0x00);
|
||||||
if ($nullOffset)
|
if ($nullOffset) {
|
||||||
$url = substr($url, 0, $nullOffset);
|
$url = substr($url, 0, $nullOffset);
|
||||||
|
}
|
||||||
$url .= $hasText ? '#' : '';
|
$url .= $hasText ? '#' : '';
|
||||||
$offset += $us;
|
$offset += $us;
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -467,7 +467,7 @@ class PHPExcel_Reader_Gnumeric extends PHPExcel_Reader_Abstract implements PHPEx
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((!$this->_readDataOnly) && (isset($sheet->Objects))) {
|
if ((!$this->_readDataOnly) && (isset($sheet->Objects))) {
|
||||||
foreach ($sheet->Objects->children('gnm',TRUE) as $key => $comment) {
|
foreach ($sheet->Objects->children('gnm', true) as $key => $comment) {
|
||||||
$commentAttributes = $comment->attributes();
|
$commentAttributes = $comment->attributes();
|
||||||
// Only comment objects are handled at the moment
|
// Only comment objects are handled at the moment
|
||||||
if ($commentAttributes->Text) {
|
if ($commentAttributes->Text) {
|
||||||
|
@ -481,7 +481,6 @@ class PHPExcel_Reader_Gnumeric extends PHPExcel_Reader_Abstract implements PHPEx
|
||||||
$styleAttributes = $styleRegion->attributes();
|
$styleAttributes = $styleRegion->attributes();
|
||||||
if (($styleAttributes['startRow'] <= $maxRow) &&
|
if (($styleAttributes['startRow'] <= $maxRow) &&
|
||||||
($styleAttributes['startCol'] <= $maxCol)) {
|
($styleAttributes['startCol'] <= $maxCol)) {
|
||||||
|
|
||||||
$startColumn = PHPExcel_Cell::stringFromColumnIndex((int) $styleAttributes['startCol']);
|
$startColumn = PHPExcel_Cell::stringFromColumnIndex((int) $styleAttributes['startCol']);
|
||||||
$startRow = $styleAttributes['startRow'] + 1;
|
$startRow = $styleAttributes['startRow'] + 1;
|
||||||
|
|
||||||
|
@ -767,7 +766,7 @@ class PHPExcel_Reader_Gnumeric extends PHPExcel_Reader_Abstract implements PHPEx
|
||||||
}
|
}
|
||||||
|
|
||||||
$range = explode('!', $range);
|
$range = explode('!', $range);
|
||||||
$range[0] = trim($range[0],"'");;
|
$range[0] = trim($range[0], "'");
|
||||||
if ($worksheet = $objPHPExcel->getSheetByName($range[0])) {
|
if ($worksheet = $objPHPExcel->getSheetByName($range[0])) {
|
||||||
$extractedRange = str_replace('$', '', $range[1]);
|
$extractedRange = str_replace('$', '', $range[1]);
|
||||||
$objPHPExcel->addNamedRange(new PHPExcel_NamedRange($name, $worksheet, $extractedRange));
|
$objPHPExcel->addNamedRange(new PHPExcel_NamedRange($name, $worksheet, $extractedRange));
|
||||||
|
@ -844,7 +843,8 @@ class PHPExcel_Reader_Gnumeric extends PHPExcel_Reader_Abstract implements PHPEx
|
||||||
return $value;
|
return $value;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static function _parseGnumericColour($gnmColour) {
|
private static function _parseGnumericColour($gnmColour)
|
||||||
|
{
|
||||||
list($gnmR, $gnmG, $gnmB) = explode(':', $gnmColour);
|
list($gnmR, $gnmG, $gnmB) = explode(':', $gnmColour);
|
||||||
$gnmR = substr(str_pad($gnmR, 4, '0', STR_PAD_RIGHT), 0, 2);
|
$gnmR = substr(str_pad($gnmR, 4, '0', STR_PAD_RIGHT), 0, 2);
|
||||||
$gnmG = substr(str_pad($gnmG, 4, '0', STR_PAD_RIGHT), 0, 2);
|
$gnmG = substr(str_pad($gnmG, 4, '0', STR_PAD_RIGHT), 0, 2);
|
||||||
|
|
|
@ -54,7 +54,8 @@ class PHPExcel_Reader_OOCalc extends PHPExcel_Reader_Abstract implements PHPExce
|
||||||
/**
|
/**
|
||||||
* Create a new PHPExcel_Reader_OOCalc
|
* Create a new PHPExcel_Reader_OOCalc
|
||||||
*/
|
*/
|
||||||
public function __construct() {
|
public function __construct()
|
||||||
|
{
|
||||||
$this->_readFilter = new PHPExcel_Reader_DefaultReadFilter();
|
$this->_readFilter = new PHPExcel_Reader_DefaultReadFilter();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -473,8 +474,7 @@ class PHPExcel_Reader_OOCalc extends PHPExcel_Reader_Abstract implements PHPExce
|
||||||
}
|
}
|
||||||
case 'table-row':
|
case 'table-row':
|
||||||
$rowDataTableAttributes = $rowData->attributes($namespacesContent['table']);
|
$rowDataTableAttributes = $rowData->attributes($namespacesContent['table']);
|
||||||
$rowRepeats = (isset($rowDataTableAttributes['number-rows-repeated'])) ?
|
$rowRepeats = (isset($rowDataTableAttributes['number-rows-repeated'])) ? $rowDataTableAttributes['number-rows-repeated'] : 1;
|
||||||
$rowDataTableAttributes['number-rows-repeated'] : 1;
|
|
||||||
$columnID = 'A';
|
$columnID = 'A';
|
||||||
foreach ($rowData as $key => $cellData) {
|
foreach ($rowData as $key => $cellData) {
|
||||||
if ($this->getReadFilter() !== null) {
|
if ($this->getReadFilter() !== null) {
|
||||||
|
@ -484,9 +484,7 @@ class PHPExcel_Reader_OOCalc extends PHPExcel_Reader_Abstract implements PHPExce
|
||||||
}
|
}
|
||||||
|
|
||||||
// echo '<b>'.$columnID.$rowID.'</b><br />';
|
// echo '<b>'.$columnID.$rowID.'</b><br />';
|
||||||
$cellDataText = (isset($namespacesContent['text'])) ?
|
$cellDataText = (isset($namespacesContent['text'])) ? $cellData->children($namespacesContent['text']) : '';
|
||||||
$cellData->children($namespacesContent['text']) :
|
|
||||||
'';
|
|
||||||
$cellDataOffice = $cellData->children($namespacesContent['office']);
|
$cellDataOffice = $cellData->children($namespacesContent['office']);
|
||||||
$cellDataOfficeAttributes = $cellData->attributes($namespacesContent['office']);
|
$cellDataOfficeAttributes = $cellData->attributes($namespacesContent['office']);
|
||||||
$cellDataTableAttributes = $cellData->attributes($namespacesContent['table']);
|
$cellDataTableAttributes = $cellData->attributes($namespacesContent['table']);
|
||||||
|
@ -522,9 +520,8 @@ class PHPExcel_Reader_OOCalc extends PHPExcel_Reader_Abstract implements PHPExce
|
||||||
}
|
}
|
||||||
$text = implode("\n", $textArray);
|
$text = implode("\n", $textArray);
|
||||||
// echo $text, '<br />';
|
// echo $text, '<br />';
|
||||||
$objPHPExcel->getActiveSheet()->getComment( $columnID.$rowID )
|
$objPHPExcel->getActiveSheet()->getComment($columnID.$rowID)->setText($this->_parseRichText($text));
|
||||||
// ->setAuthor( $author )
|
// ->setAuthor( $author )
|
||||||
->setText($this->_parseRichText($text) );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($cellDataText->p)) {
|
if (isset($cellDataText->p)) {
|
||||||
|
@ -583,11 +580,12 @@ class PHPExcel_Reader_OOCalc extends PHPExcel_Reader_Abstract implements PHPExce
|
||||||
$type = PHPExcel_Cell_DataType::TYPE_NUMERIC;
|
$type = PHPExcel_Cell_DataType::TYPE_NUMERIC;
|
||||||
$dataValue = (float) $cellDataOfficeAttributes['value'];
|
$dataValue = (float) $cellDataOfficeAttributes['value'];
|
||||||
if (floor($dataValue) == $dataValue) {
|
if (floor($dataValue) == $dataValue) {
|
||||||
if ($dataValue == (integer) $dataValue)
|
if ($dataValue == (integer) $dataValue) {
|
||||||
$dataValue = (integer) $dataValue;
|
$dataValue = (integer) $dataValue;
|
||||||
else
|
} else {
|
||||||
$dataValue = (float) $dataValue;
|
$dataValue = (float) $dataValue;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case 'date':
|
case 'date':
|
||||||
$type = PHPExcel_Cell_DataType::TYPE_NUMERIC;
|
$type = PHPExcel_Cell_DataType::TYPE_NUMERIC;
|
||||||
|
|
|
@ -176,8 +176,16 @@ class PHPExcel_Shared_JAMA_Matrix
|
||||||
//A($i0...; $j0...)
|
//A($i0...; $j0...)
|
||||||
case 'integer,integer':
|
case 'integer,integer':
|
||||||
list($i0, $j0) = $args;
|
list($i0, $j0) = $args;
|
||||||
if ($i0 >= 0) { $m = $this->m - $i0; } else { throw new PHPExcel_Calculation_Exception(self::ArgumentBoundsException); }
|
if ($i0 >= 0) {
|
||||||
if ($j0 >= 0) { $n = $this->n - $j0; } else { throw new PHPExcel_Calculation_Exception(self::ArgumentBoundsException); }
|
$m = $this->m - $i0;
|
||||||
|
} else {
|
||||||
|
throw new PHPExcel_Calculation_Exception(self::ArgumentBoundsException);
|
||||||
|
}
|
||||||
|
if ($j0 >= 0) {
|
||||||
|
$n = $this->n - $j0;
|
||||||
|
} else {
|
||||||
|
throw new PHPExcel_Calculation_Exception(self::ArgumentBoundsException);
|
||||||
|
}
|
||||||
$R = new PHPExcel_Shared_JAMA_Matrix($m, $n);
|
$R = new PHPExcel_Shared_JAMA_Matrix($m, $n);
|
||||||
for ($i = $i0; $i < $this->m; ++$i) {
|
for ($i = $i0; $i < $this->m; ++$i) {
|
||||||
for ($j = $j0; $j < $this->n; ++$j) {
|
for ($j = $j0; $j < $this->n; ++$j) {
|
||||||
|
@ -189,8 +197,12 @@ class PHPExcel_Shared_JAMA_Matrix
|
||||||
//A($i0...$iF; $j0...$jF)
|
//A($i0...$iF; $j0...$jF)
|
||||||
case 'integer,integer,integer,integer':
|
case 'integer,integer,integer,integer':
|
||||||
list($i0, $iF, $j0, $jF) = $args;
|
list($i0, $iF, $j0, $jF) = $args;
|
||||||
if (($iF > $i0) && ($this->m >= $iF) && ($i0 >= 0)) { $m = $iF - $i0; } else { throw new PHPExcel_Calculation_Exception(self::ArgumentBoundsException); }
|
if (($iF > $i0) && ($this->m >= $iF) && ($i0 >= 0)) {
|
||||||
if (($jF > $j0) && ($this->n >= $jF) && ($j0 >= 0)) { $n = $jF - $j0; } else { throw new PHPExcel_Calculation_Exception(self::ArgumentBoundsException); }
|
$m = $iF - $i0; } else { throw new PHPExcel_Calculation_Exception(self::ArgumentBoundsException);
|
||||||
|
}
|
||||||
|
if (($jF > $j0) && ($this->n >= $jF) && ($j0 >= 0)) {
|
||||||
|
$n = $jF - $j0; } else { throw new PHPExcel_Calculation_Exception(self::ArgumentBoundsException);
|
||||||
|
}
|
||||||
$R = new PHPExcel_Shared_JAMA_Matrix($m+1, $n+1);
|
$R = new PHPExcel_Shared_JAMA_Matrix($m+1, $n+1);
|
||||||
for ($i = $i0; $i <= $iF; ++$i) {
|
for ($i = $i0; $i <= $iF; ++$i) {
|
||||||
for ($j = $j0; $j <= $jF; ++$j) {
|
for ($j = $j0; $j <= $jF; ++$j) {
|
||||||
|
@ -202,8 +214,16 @@ class PHPExcel_Shared_JAMA_Matrix
|
||||||
//$R = array of row indices; $C = array of column indices
|
//$R = array of row indices; $C = array of column indices
|
||||||
case 'array,array':
|
case 'array,array':
|
||||||
list($RL, $CL) = $args;
|
list($RL, $CL) = $args;
|
||||||
if (count($RL) > 0) { $m = count($RL); } else { throw new PHPExcel_Calculation_Exception(self::ArgumentBoundsException); }
|
if (count($RL) > 0) {
|
||||||
if (count($CL) > 0) { $n = count($CL); } else { throw new PHPExcel_Calculation_Exception(self::ArgumentBoundsException); }
|
$m = count($RL);
|
||||||
|
} else {
|
||||||
|
throw new PHPExcel_Calculation_Exception(self::ArgumentBoundsException);
|
||||||
|
}
|
||||||
|
if (count($CL) > 0) {
|
||||||
|
$n = count($CL);
|
||||||
|
} else {
|
||||||
|
throw new PHPExcel_Calculation_Exception(self::ArgumentBoundsException);
|
||||||
|
}
|
||||||
$R = new PHPExcel_Shared_JAMA_Matrix($m, $n);
|
$R = new PHPExcel_Shared_JAMA_Matrix($m, $n);
|
||||||
for ($i = 0; $i < $m; ++$i) {
|
for ($i = 0; $i < $m; ++$i) {
|
||||||
for ($j = 0; $j < $n; ++$j) {
|
for ($j = 0; $j < $n; ++$j) {
|
||||||
|
@ -215,8 +235,16 @@ class PHPExcel_Shared_JAMA_Matrix
|
||||||
//$RL = array of row indices; $CL = array of column indices
|
//$RL = array of row indices; $CL = array of column indices
|
||||||
case 'array,array':
|
case 'array,array':
|
||||||
list($RL, $CL) = $args;
|
list($RL, $CL) = $args;
|
||||||
if (count($RL) > 0) { $m = count($RL); } else { throw new PHPExcel_Calculation_Exception(self::ArgumentBoundsException); }
|
if (count($RL) > 0) {
|
||||||
if (count($CL) > 0) { $n = count($CL); } else { throw new PHPExcel_Calculation_Exception(self::ArgumentBoundsException); }
|
$m = count($RL);
|
||||||
|
} else {
|
||||||
|
throw new PHPExcel_Calculation_Exception(self::ArgumentBoundsException);
|
||||||
|
}
|
||||||
|
if (count($CL) > 0) {
|
||||||
|
$n = count($CL);
|
||||||
|
} else {
|
||||||
|
throw new PHPExcel_Calculation_Exception(self::ArgumentBoundsException);
|
||||||
|
}
|
||||||
$R = new PHPExcel_Shared_JAMA_Matrix($m, $n);
|
$R = new PHPExcel_Shared_JAMA_Matrix($m, $n);
|
||||||
for ($i = 0; $i < $m; ++$i) {
|
for ($i = 0; $i < $m; ++$i) {
|
||||||
for ($j = 0; $j < $n; ++$j) {
|
for ($j = 0; $j < $n; ++$j) {
|
||||||
|
@ -228,8 +256,16 @@ class PHPExcel_Shared_JAMA_Matrix
|
||||||
//A($i0...$iF); $CL = array of column indices
|
//A($i0...$iF); $CL = array of column indices
|
||||||
case 'integer,integer,array':
|
case 'integer,integer,array':
|
||||||
list($i0, $iF, $CL) = $args;
|
list($i0, $iF, $CL) = $args;
|
||||||
if (($iF > $i0) && ($this->m >= $iF) && ($i0 >= 0)) { $m = $iF - $i0; } else { throw new PHPExcel_Calculation_Exception(self::ArgumentBoundsException); }
|
if (($iF > $i0) && ($this->m >= $iF) && ($i0 >= 0)) {
|
||||||
if (count($CL) > 0) { $n = count($CL); } else { throw new PHPExcel_Calculation_Exception(self::ArgumentBoundsException); }
|
$m = $iF - $i0;
|
||||||
|
} else {
|
||||||
|
throw new PHPExcel_Calculation_Exception(self::ArgumentBoundsException);
|
||||||
|
}
|
||||||
|
if (count($CL) > 0) {
|
||||||
|
$n = count($CL);
|
||||||
|
} else {
|
||||||
|
throw new PHPExcel_Calculation_Exception(self::ArgumentBoundsException);
|
||||||
|
}
|
||||||
$R = new PHPExcel_Shared_JAMA_Matrix($m, $n);
|
$R = new PHPExcel_Shared_JAMA_Matrix($m, $n);
|
||||||
for ($i = $i0; $i < $iF; ++$i) {
|
for ($i = $i0; $i < $iF; ++$i) {
|
||||||
for ($j = 0; $j < $n; ++$j) {
|
for ($j = 0; $j < $n; ++$j) {
|
||||||
|
@ -241,8 +277,16 @@ class PHPExcel_Shared_JAMA_Matrix
|
||||||
//$RL = array of row indices
|
//$RL = array of row indices
|
||||||
case 'array,integer,integer':
|
case 'array,integer,integer':
|
||||||
list($RL, $j0, $jF) = $args;
|
list($RL, $j0, $jF) = $args;
|
||||||
if (count($RL) > 0) { $m = count($RL); } else { throw new PHPExcel_Calculation_Exception(self::ArgumentBoundsException); }
|
if (count($RL) > 0) {
|
||||||
if (($jF >= $j0) && ($this->n >= $jF) && ($j0 >= 0)) { $n = $jF - $j0; } else { throw new PHPExcel_Calculation_Exception(self::ArgumentBoundsException); }
|
$m = count($RL);
|
||||||
|
} else {
|
||||||
|
throw new PHPExcel_Calculation_Exception(self::ArgumentBoundsException);
|
||||||
|
}
|
||||||
|
if (($jF >= $j0) && ($this->n >= $jF) && ($j0 >= 0)) {
|
||||||
|
$n = $jF - $j0;
|
||||||
|
} else {
|
||||||
|
throw new PHPExcel_Calculation_Exception(self::ArgumentBoundsException);
|
||||||
|
}
|
||||||
$R = new PHPExcel_Shared_JAMA_Matrix($m, $n+1);
|
$R = new PHPExcel_Shared_JAMA_Matrix($m, $n+1);
|
||||||
for ($i = 0; $i < $m; ++$i) {
|
for ($i = 0; $i < $m; ++$i) {
|
||||||
for ($j = $j0; $j <= $jF; ++$j) {
|
for ($j = $j0; $j <= $jF; ++$j) {
|
||||||
|
|
|
@ -233,4 +233,3 @@ class PHPExcel_Shared_JAMA_QRDecomposition
|
||||||
}
|
}
|
||||||
} // function solve()
|
} // function solve()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3458,7 +3458,6 @@ class PclZip
|
||||||
}
|
}
|
||||||
|
|
||||||
if (($v_result = $this->privDirCheck($v_dir_to_check, (($p_entry['external']&0x00000010)==0x00000010))) != 1) {
|
if (($v_result = $this->privDirCheck($v_dir_to_check, (($p_entry['external']&0x00000010)==0x00000010))) != 1) {
|
||||||
|
|
||||||
// ----- Change the file status
|
// ----- Change the file status
|
||||||
$p_entry['status'] = "path_creation_fail";
|
$p_entry['status'] = "path_creation_fail";
|
||||||
|
|
||||||
|
|
|
@ -25,7 +25,7 @@ class DateTimeTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_DateTime','DATE'),$args);
|
$result = call_user_func_array(array('PHPExcel_Calculation_DateTime','DATE'),$args);
|
||||||
$this->assertEquals($expectedResult, $result, NULL, 1E-8);
|
$this->assertEquals($expectedResult, $result, null, 1E-8);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function providerDATE()
|
public function providerDATE()
|
||||||
|
@ -38,7 +38,7 @@ class DateTimeTest extends PHPUnit_Framework_TestCase
|
||||||
PHPExcel_Calculation_Functions::setReturnDateType(PHPExcel_Calculation_Functions::RETURNDATE_PHP_NUMERIC);
|
PHPExcel_Calculation_Functions::setReturnDateType(PHPExcel_Calculation_Functions::RETURNDATE_PHP_NUMERIC);
|
||||||
$result = PHPExcel_Calculation_DateTime::DATE(2012,1,31);
|
$result = PHPExcel_Calculation_DateTime::DATE(2012,1,31);
|
||||||
PHPExcel_Calculation_Functions::setReturnDateType(PHPExcel_Calculation_Functions::RETURNDATE_EXCEL);
|
PHPExcel_Calculation_Functions::setReturnDateType(PHPExcel_Calculation_Functions::RETURNDATE_EXCEL);
|
||||||
$this->assertEquals(1327968000, $result, NULL, 1E-8);
|
$this->assertEquals(1327968000, $result, null, 1E-8);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testDATEtoPHPObject()
|
public function testDATEtoPHPObject()
|
||||||
|
@ -78,7 +78,7 @@ class DateTimeTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_DateTime','DATEVALUE'),$args);
|
$result = call_user_func_array(array('PHPExcel_Calculation_DateTime','DATEVALUE'),$args);
|
||||||
$this->assertEquals($expectedResult, $result, NULL, 1E-8);
|
$this->assertEquals($expectedResult, $result, null, 1E-8);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function providerDATEVALUE()
|
public function providerDATEVALUE()
|
||||||
|
@ -91,7 +91,7 @@ class DateTimeTest extends PHPUnit_Framework_TestCase
|
||||||
PHPExcel_Calculation_Functions::setReturnDateType(PHPExcel_Calculation_Functions::RETURNDATE_PHP_NUMERIC);
|
PHPExcel_Calculation_Functions::setReturnDateType(PHPExcel_Calculation_Functions::RETURNDATE_PHP_NUMERIC);
|
||||||
$result = PHPExcel_Calculation_DateTime::DATEVALUE('2012-1-31');
|
$result = PHPExcel_Calculation_DateTime::DATEVALUE('2012-1-31');
|
||||||
PHPExcel_Calculation_Functions::setReturnDateType(PHPExcel_Calculation_Functions::RETURNDATE_EXCEL);
|
PHPExcel_Calculation_Functions::setReturnDateType(PHPExcel_Calculation_Functions::RETURNDATE_EXCEL);
|
||||||
$this->assertEquals(1327968000, $result, NULL, 1E-8);
|
$this->assertEquals(1327968000, $result, null, 1E-8);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testDATEVALUEtoPHPObject()
|
public function testDATEVALUEtoPHPObject()
|
||||||
|
@ -115,7 +115,7 @@ class DateTimeTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_DateTime','YEAR'),$args);
|
$result = call_user_func_array(array('PHPExcel_Calculation_DateTime','YEAR'),$args);
|
||||||
$this->assertEquals($expectedResult, $result, NULL, 1E-8);
|
$this->assertEquals($expectedResult, $result, null, 1E-8);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function providerYEAR()
|
public function providerYEAR()
|
||||||
|
@ -131,7 +131,7 @@ class DateTimeTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_DateTime','MONTHOFYEAR'),$args);
|
$result = call_user_func_array(array('PHPExcel_Calculation_DateTime','MONTHOFYEAR'),$args);
|
||||||
$this->assertEquals($expectedResult, $result, NULL, 1E-8);
|
$this->assertEquals($expectedResult, $result, null, 1E-8);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function providerMONTH()
|
public function providerMONTH()
|
||||||
|
@ -147,7 +147,7 @@ class DateTimeTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_DateTime','WEEKOFYEAR'),$args);
|
$result = call_user_func_array(array('PHPExcel_Calculation_DateTime','WEEKOFYEAR'),$args);
|
||||||
$this->assertEquals($expectedResult, $result, NULL, 1E-8);
|
$this->assertEquals($expectedResult, $result, null, 1E-8);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function providerWEEKNUM()
|
public function providerWEEKNUM()
|
||||||
|
@ -163,7 +163,7 @@ class DateTimeTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_DateTime','DAYOFWEEK'),$args);
|
$result = call_user_func_array(array('PHPExcel_Calculation_DateTime','DAYOFWEEK'),$args);
|
||||||
$this->assertEquals($expectedResult, $result, NULL, 1E-8);
|
$this->assertEquals($expectedResult, $result, null, 1E-8);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function providerWEEKDAY()
|
public function providerWEEKDAY()
|
||||||
|
@ -179,7 +179,7 @@ class DateTimeTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_DateTime','DAYOFMONTH'),$args);
|
$result = call_user_func_array(array('PHPExcel_Calculation_DateTime','DAYOFMONTH'),$args);
|
||||||
$this->assertEquals($expectedResult, $result, NULL, 1E-8);
|
$this->assertEquals($expectedResult, $result, null, 1E-8);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function providerDAY()
|
public function providerDAY()
|
||||||
|
@ -195,7 +195,7 @@ class DateTimeTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_DateTime','TIME'),$args);
|
$result = call_user_func_array(array('PHPExcel_Calculation_DateTime','TIME'),$args);
|
||||||
$this->assertEquals($expectedResult, $result, NULL, 1E-8);
|
$this->assertEquals($expectedResult, $result, null, 1E-8);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function providerTIME()
|
public function providerTIME()
|
||||||
|
@ -208,7 +208,7 @@ class DateTimeTest extends PHPUnit_Framework_TestCase
|
||||||
PHPExcel_Calculation_Functions::setReturnDateType(PHPExcel_Calculation_Functions::RETURNDATE_PHP_NUMERIC);
|
PHPExcel_Calculation_Functions::setReturnDateType(PHPExcel_Calculation_Functions::RETURNDATE_PHP_NUMERIC);
|
||||||
$result = PHPExcel_Calculation_DateTime::TIME(7,30,20);
|
$result = PHPExcel_Calculation_DateTime::TIME(7,30,20);
|
||||||
PHPExcel_Calculation_Functions::setReturnDateType(PHPExcel_Calculation_Functions::RETURNDATE_EXCEL);
|
PHPExcel_Calculation_Functions::setReturnDateType(PHPExcel_Calculation_Functions::RETURNDATE_EXCEL);
|
||||||
$this->assertEquals(27020, $result, NULL, 1E-8);
|
$this->assertEquals(27020, $result, null, 1E-8);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testTIMEtoPHPObject()
|
public function testTIMEtoPHPObject()
|
||||||
|
@ -232,7 +232,7 @@ class DateTimeTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_DateTime','TIMEVALUE'),$args);
|
$result = call_user_func_array(array('PHPExcel_Calculation_DateTime','TIMEVALUE'),$args);
|
||||||
$this->assertEquals($expectedResult, $result, NULL, 1E-8);
|
$this->assertEquals($expectedResult, $result, null, 1E-8);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function providerTIMEVALUE()
|
public function providerTIMEVALUE()
|
||||||
|
@ -245,7 +245,7 @@ class DateTimeTest extends PHPUnit_Framework_TestCase
|
||||||
PHPExcel_Calculation_Functions::setReturnDateType(PHPExcel_Calculation_Functions::RETURNDATE_PHP_NUMERIC);
|
PHPExcel_Calculation_Functions::setReturnDateType(PHPExcel_Calculation_Functions::RETURNDATE_PHP_NUMERIC);
|
||||||
$result = PHPExcel_Calculation_DateTime::TIMEVALUE('7:30:20');
|
$result = PHPExcel_Calculation_DateTime::TIMEVALUE('7:30:20');
|
||||||
PHPExcel_Calculation_Functions::setReturnDateType(PHPExcel_Calculation_Functions::RETURNDATE_EXCEL);
|
PHPExcel_Calculation_Functions::setReturnDateType(PHPExcel_Calculation_Functions::RETURNDATE_EXCEL);
|
||||||
$this->assertEquals(23420, $result, NULL, 1E-8);
|
$this->assertEquals(23420, $result, null, 1E-8);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testTIMEVALUEtoPHPObject()
|
public function testTIMEVALUEtoPHPObject()
|
||||||
|
@ -269,7 +269,7 @@ class DateTimeTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_DateTime','HOUROFDAY'),$args);
|
$result = call_user_func_array(array('PHPExcel_Calculation_DateTime','HOUROFDAY'),$args);
|
||||||
$this->assertEquals($expectedResult, $result, NULL, 1E-8);
|
$this->assertEquals($expectedResult, $result, null, 1E-8);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function providerHOUR()
|
public function providerHOUR()
|
||||||
|
@ -285,7 +285,7 @@ class DateTimeTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_DateTime','MINUTEOFHOUR'),$args);
|
$result = call_user_func_array(array('PHPExcel_Calculation_DateTime','MINUTEOFHOUR'),$args);
|
||||||
$this->assertEquals($expectedResult, $result, NULL, 1E-8);
|
$this->assertEquals($expectedResult, $result, null, 1E-8);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function providerMINUTE()
|
public function providerMINUTE()
|
||||||
|
@ -301,7 +301,7 @@ class DateTimeTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_DateTime','SECONDOFMINUTE'),$args);
|
$result = call_user_func_array(array('PHPExcel_Calculation_DateTime','SECONDOFMINUTE'),$args);
|
||||||
$this->assertEquals($expectedResult, $result, NULL, 1E-8);
|
$this->assertEquals($expectedResult, $result, null, 1E-8);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function providerSECOND()
|
public function providerSECOND()
|
||||||
|
@ -317,7 +317,7 @@ class DateTimeTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_DateTime','NETWORKDAYS'),$args);
|
$result = call_user_func_array(array('PHPExcel_Calculation_DateTime','NETWORKDAYS'),$args);
|
||||||
$this->assertEquals($expectedResult, $result, NULL, 1E-8);
|
$this->assertEquals($expectedResult, $result, null, 1E-8);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function providerNETWORKDAYS()
|
public function providerNETWORKDAYS()
|
||||||
|
@ -333,7 +333,7 @@ class DateTimeTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_DateTime','WORKDAY'),$args);
|
$result = call_user_func_array(array('PHPExcel_Calculation_DateTime','WORKDAY'),$args);
|
||||||
$this->assertEquals($expectedResult, $result, NULL, 1E-8);
|
$this->assertEquals($expectedResult, $result, null, 1E-8);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function providerWORKDAY()
|
public function providerWORKDAY()
|
||||||
|
@ -349,7 +349,7 @@ class DateTimeTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_DateTime','EDATE'),$args);
|
$result = call_user_func_array(array('PHPExcel_Calculation_DateTime','EDATE'),$args);
|
||||||
$this->assertEquals($expectedResult, $result, NULL, 1E-8);
|
$this->assertEquals($expectedResult, $result, null, 1E-8);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function providerEDATE()
|
public function providerEDATE()
|
||||||
|
@ -362,7 +362,7 @@ class DateTimeTest extends PHPUnit_Framework_TestCase
|
||||||
PHPExcel_Calculation_Functions::setReturnDateType(PHPExcel_Calculation_Functions::RETURNDATE_PHP_NUMERIC);
|
PHPExcel_Calculation_Functions::setReturnDateType(PHPExcel_Calculation_Functions::RETURNDATE_PHP_NUMERIC);
|
||||||
$result = PHPExcel_Calculation_DateTime::EDATE('2012-1-26',-1);
|
$result = PHPExcel_Calculation_DateTime::EDATE('2012-1-26',-1);
|
||||||
PHPExcel_Calculation_Functions::setReturnDateType(PHPExcel_Calculation_Functions::RETURNDATE_EXCEL);
|
PHPExcel_Calculation_Functions::setReturnDateType(PHPExcel_Calculation_Functions::RETURNDATE_EXCEL);
|
||||||
$this->assertEquals(1324857600, $result, NULL, 1E-8);
|
$this->assertEquals(1324857600, $result, null, 1E-8);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testEDATEtoPHPObject()
|
public function testEDATEtoPHPObject()
|
||||||
|
@ -386,7 +386,7 @@ class DateTimeTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_DateTime','EOMONTH'),$args);
|
$result = call_user_func_array(array('PHPExcel_Calculation_DateTime','EOMONTH'),$args);
|
||||||
$this->assertEquals($expectedResult, $result, NULL, 1E-8);
|
$this->assertEquals($expectedResult, $result, null, 1E-8);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function providerEOMONTH()
|
public function providerEOMONTH()
|
||||||
|
@ -399,7 +399,7 @@ class DateTimeTest extends PHPUnit_Framework_TestCase
|
||||||
PHPExcel_Calculation_Functions::setReturnDateType(PHPExcel_Calculation_Functions::RETURNDATE_PHP_NUMERIC);
|
PHPExcel_Calculation_Functions::setReturnDateType(PHPExcel_Calculation_Functions::RETURNDATE_PHP_NUMERIC);
|
||||||
$result = PHPExcel_Calculation_DateTime::EOMONTH('2012-1-26',-1);
|
$result = PHPExcel_Calculation_DateTime::EOMONTH('2012-1-26',-1);
|
||||||
PHPExcel_Calculation_Functions::setReturnDateType(PHPExcel_Calculation_Functions::RETURNDATE_EXCEL);
|
PHPExcel_Calculation_Functions::setReturnDateType(PHPExcel_Calculation_Functions::RETURNDATE_EXCEL);
|
||||||
$this->assertEquals(1325289600, $result, NULL, 1E-8);
|
$this->assertEquals(1325289600, $result, null, 1E-8);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testEOMONTHtoPHPObject()
|
public function testEOMONTHtoPHPObject()
|
||||||
|
@ -423,7 +423,7 @@ class DateTimeTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_DateTime','DATEDIF'),$args);
|
$result = call_user_func_array(array('PHPExcel_Calculation_DateTime','DATEDIF'),$args);
|
||||||
$this->assertEquals($expectedResult, $result, NULL, 1E-8);
|
$this->assertEquals($expectedResult, $result, null, 1E-8);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function providerDATEDIF()
|
public function providerDATEDIF()
|
||||||
|
@ -439,7 +439,7 @@ class DateTimeTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_DateTime','DAYS360'),$args);
|
$result = call_user_func_array(array('PHPExcel_Calculation_DateTime','DAYS360'),$args);
|
||||||
$this->assertEquals($expectedResult, $result, NULL, 1E-8);
|
$this->assertEquals($expectedResult, $result, null, 1E-8);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function providerDAYS360()
|
public function providerDAYS360()
|
||||||
|
@ -455,7 +455,7 @@ class DateTimeTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_DateTime','YEARFRAC'),$args);
|
$result = call_user_func_array(array('PHPExcel_Calculation_DateTime','YEARFRAC'),$args);
|
||||||
$this->assertEquals($expectedResult, $result, NULL, 1E-8);
|
$this->assertEquals($expectedResult, $result, null, 1E-8);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function providerYEARFRAC()
|
public function providerYEARFRAC()
|
||||||
|
|
|
@ -29,7 +29,7 @@ class EngineeringTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_Engineering','BESSELI'),$args);
|
$result = call_user_func_array(array('PHPExcel_Calculation_Engineering','BESSELI'),$args);
|
||||||
$this->assertEquals($expectedResult, $result, NULL, 1E-8);
|
$this->assertEquals($expectedResult, $result, null, 1E-8);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function providerBESSELI()
|
public function providerBESSELI()
|
||||||
|
@ -45,7 +45,7 @@ class EngineeringTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_Engineering','BESSELJ'),$args);
|
$result = call_user_func_array(array('PHPExcel_Calculation_Engineering','BESSELJ'),$args);
|
||||||
$this->assertEquals($expectedResult, $result, NULL, 1E-8);
|
$this->assertEquals($expectedResult, $result, null, 1E-8);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function providerBESSELJ()
|
public function providerBESSELJ()
|
||||||
|
@ -61,7 +61,7 @@ class EngineeringTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_Engineering','BESSELK'),$args);
|
$result = call_user_func_array(array('PHPExcel_Calculation_Engineering','BESSELK'),$args);
|
||||||
$this->assertEquals($expectedResult, $result, NULL, 1E-8);
|
$this->assertEquals($expectedResult, $result, null, 1E-8);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function providerBESSELK()
|
public function providerBESSELK()
|
||||||
|
@ -77,7 +77,7 @@ class EngineeringTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_Engineering','BESSELY'),$args);
|
$result = call_user_func_array(array('PHPExcel_Calculation_Engineering','BESSELY'),$args);
|
||||||
$this->assertEquals($expectedResult, $result, NULL, 1E-8);
|
$this->assertEquals($expectedResult, $result, null, 1E-8);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function providerBESSELY()
|
public function providerBESSELY()
|
||||||
|
@ -109,7 +109,7 @@ class EngineeringTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_Engineering','IMAGINARY'),$args);
|
$result = call_user_func_array(array('PHPExcel_Calculation_Engineering','IMAGINARY'),$args);
|
||||||
$this->assertEquals($expectedResult, $result, NULL, 1E-8);
|
$this->assertEquals($expectedResult, $result, null, 1E-8);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function providerIMAGINARY()
|
public function providerIMAGINARY()
|
||||||
|
@ -125,7 +125,7 @@ class EngineeringTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_Engineering','IMREAL'),$args);
|
$result = call_user_func_array(array('PHPExcel_Calculation_Engineering','IMREAL'),$args);
|
||||||
$this->assertEquals($expectedResult, $result, NULL, 1E-8);
|
$this->assertEquals($expectedResult, $result, null, 1E-8);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function providerIMREAL()
|
public function providerIMREAL()
|
||||||
|
@ -141,7 +141,7 @@ class EngineeringTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_Engineering','IMABS'),$args);
|
$result = call_user_func_array(array('PHPExcel_Calculation_Engineering','IMABS'),$args);
|
||||||
$this->assertEquals($expectedResult, $result, NULL, 1E-8);
|
$this->assertEquals($expectedResult, $result, null, 1E-8);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function providerIMABS()
|
public function providerIMABS()
|
||||||
|
@ -157,7 +157,7 @@ class EngineeringTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_Engineering','IMARGUMENT'),$args);
|
$result = call_user_func_array(array('PHPExcel_Calculation_Engineering','IMARGUMENT'),$args);
|
||||||
$this->assertEquals($expectedResult, $result, NULL, 1E-8);
|
$this->assertEquals($expectedResult, $result, null, 1E-8);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function providerIMARGUMENT()
|
public function providerIMARGUMENT()
|
||||||
|
@ -407,7 +407,7 @@ class EngineeringTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_Engineering','ERF'),$args);
|
$result = call_user_func_array(array('PHPExcel_Calculation_Engineering','ERF'),$args);
|
||||||
$this->assertEquals($expectedResult, $result, NULL, 1E-12);
|
$this->assertEquals($expectedResult, $result, null, 1E-12);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function providerERF()
|
public function providerERF()
|
||||||
|
@ -423,7 +423,7 @@ class EngineeringTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_Engineering','ERFC'),$args);
|
$result = call_user_func_array(array('PHPExcel_Calculation_Engineering','ERFC'),$args);
|
||||||
$this->assertEquals($expectedResult, $result, NULL, 1E-12);
|
$this->assertEquals($expectedResult, $result, null, 1E-12);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function providerERFC()
|
public function providerERFC()
|
||||||
|
@ -487,7 +487,7 @@ class EngineeringTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_Engineering','DECTOBIN'),$args);
|
$result = call_user_func_array(array('PHPExcel_Calculation_Engineering','DECTOBIN'),$args);
|
||||||
$this->assertEquals($expectedResult, $result, NULL);
|
$this->assertEquals($expectedResult, $result, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function providerDEC2BIN()
|
public function providerDEC2BIN()
|
||||||
|
@ -503,7 +503,7 @@ class EngineeringTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_Engineering','DECTOHEX'),$args);
|
$result = call_user_func_array(array('PHPExcel_Calculation_Engineering','DECTOHEX'),$args);
|
||||||
$this->assertEquals($expectedResult, $result, NULL);
|
$this->assertEquals($expectedResult, $result, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function providerDEC2HEX()
|
public function providerDEC2HEX()
|
||||||
|
@ -519,7 +519,7 @@ class EngineeringTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_Engineering','DECTOOCT'),$args);
|
$result = call_user_func_array(array('PHPExcel_Calculation_Engineering','DECTOOCT'),$args);
|
||||||
$this->assertEquals($expectedResult, $result, NULL);
|
$this->assertEquals($expectedResult, $result, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function providerDEC2OCT()
|
public function providerDEC2OCT()
|
||||||
|
@ -535,7 +535,7 @@ class EngineeringTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_Engineering','HEXTOBIN'),$args);
|
$result = call_user_func_array(array('PHPExcel_Calculation_Engineering','HEXTOBIN'),$args);
|
||||||
$this->assertEquals($expectedResult, $result, NULL);
|
$this->assertEquals($expectedResult, $result, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function providerHEX2BIN()
|
public function providerHEX2BIN()
|
||||||
|
@ -551,7 +551,7 @@ class EngineeringTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_Engineering','HEXTODEC'),$args);
|
$result = call_user_func_array(array('PHPExcel_Calculation_Engineering','HEXTODEC'),$args);
|
||||||
$this->assertEquals($expectedResult, $result, NULL);
|
$this->assertEquals($expectedResult, $result, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function providerHEX2DEC()
|
public function providerHEX2DEC()
|
||||||
|
@ -567,7 +567,7 @@ class EngineeringTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_Engineering','HEXTOOCT'),$args);
|
$result = call_user_func_array(array('PHPExcel_Calculation_Engineering','HEXTOOCT'),$args);
|
||||||
$this->assertEquals($expectedResult, $result, NULL);
|
$this->assertEquals($expectedResult, $result, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function providerHEX2OCT()
|
public function providerHEX2OCT()
|
||||||
|
@ -583,7 +583,7 @@ class EngineeringTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_Engineering','OCTTOBIN'),$args);
|
$result = call_user_func_array(array('PHPExcel_Calculation_Engineering','OCTTOBIN'),$args);
|
||||||
$this->assertEquals($expectedResult, $result, NULL);
|
$this->assertEquals($expectedResult, $result, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function providerOCT2BIN()
|
public function providerOCT2BIN()
|
||||||
|
@ -599,7 +599,7 @@ class EngineeringTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_Engineering','OCTTODEC'),$args);
|
$result = call_user_func_array(array('PHPExcel_Calculation_Engineering','OCTTODEC'),$args);
|
||||||
$this->assertEquals($expectedResult, $result, NULL);
|
$this->assertEquals($expectedResult, $result, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function providerOCT2DEC()
|
public function providerOCT2DEC()
|
||||||
|
@ -615,7 +615,7 @@ class EngineeringTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_Engineering','OCTTOHEX'),$args);
|
$result = call_user_func_array(array('PHPExcel_Calculation_Engineering','OCTTOHEX'),$args);
|
||||||
$this->assertEquals($expectedResult, $result, NULL);
|
$this->assertEquals($expectedResult, $result, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function providerOCT2HEX()
|
public function providerOCT2HEX()
|
||||||
|
@ -631,7 +631,7 @@ class EngineeringTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_Engineering','DELTA'),$args);
|
$result = call_user_func_array(array('PHPExcel_Calculation_Engineering','DELTA'),$args);
|
||||||
$this->assertEquals($expectedResult, $result, NULL);
|
$this->assertEquals($expectedResult, $result, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function providerDELTA()
|
public function providerDELTA()
|
||||||
|
@ -647,7 +647,7 @@ class EngineeringTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_Engineering','GESTEP'),$args);
|
$result = call_user_func_array(array('PHPExcel_Calculation_Engineering','GESTEP'),$args);
|
||||||
$this->assertEquals($expectedResult, $result, NULL);
|
$this->assertEquals($expectedResult, $result, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function providerGESTEP()
|
public function providerGESTEP()
|
||||||
|
@ -687,7 +687,7 @@ class EngineeringTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_Engineering','CONVERTUOM'),$args);
|
$result = call_user_func_array(array('PHPExcel_Calculation_Engineering','CONVERTUOM'),$args);
|
||||||
$this->assertEquals($expectedResult, $result, NULL);
|
$this->assertEquals($expectedResult, $result, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function providerCONVERTUOM()
|
public function providerCONVERTUOM()
|
||||||
|
|
|
@ -25,7 +25,7 @@ class FinancialTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_Financial','ACCRINT'),$args);
|
$result = call_user_func_array(array('PHPExcel_Calculation_Financial','ACCRINT'),$args);
|
||||||
$this->assertEquals($expectedResult, $result, NULL, 1E-8);
|
$this->assertEquals($expectedResult, $result, null, 1E-8);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function providerACCRINT()
|
public function providerACCRINT()
|
||||||
|
@ -41,7 +41,7 @@ class FinancialTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_Financial','ACCRINTM'),$args);
|
$result = call_user_func_array(array('PHPExcel_Calculation_Financial','ACCRINTM'),$args);
|
||||||
$this->assertEquals($expectedResult, $result, NULL, 1E-8);
|
$this->assertEquals($expectedResult, $result, null, 1E-8);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function providerACCRINTM()
|
public function providerACCRINTM()
|
||||||
|
@ -57,7 +57,7 @@ class FinancialTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_Financial','AMORDEGRC'),$args);
|
$result = call_user_func_array(array('PHPExcel_Calculation_Financial','AMORDEGRC'),$args);
|
||||||
$this->assertEquals($expectedResult, $result, NULL, 1E-8);
|
$this->assertEquals($expectedResult, $result, null, 1E-8);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function providerAMORDEGRC()
|
public function providerAMORDEGRC()
|
||||||
|
@ -73,7 +73,7 @@ class FinancialTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_Financial','AMORLINC'),$args);
|
$result = call_user_func_array(array('PHPExcel_Calculation_Financial','AMORLINC'),$args);
|
||||||
$this->assertEquals($expectedResult, $result, NULL, 1E-8);
|
$this->assertEquals($expectedResult, $result, null, 1E-8);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function providerAMORLINC()
|
public function providerAMORLINC()
|
||||||
|
@ -89,7 +89,7 @@ class FinancialTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_Financial','COUPDAYBS'),$args);
|
$result = call_user_func_array(array('PHPExcel_Calculation_Financial','COUPDAYBS'),$args);
|
||||||
$this->assertEquals($expectedResult, $result, NULL, 1E-8);
|
$this->assertEquals($expectedResult, $result, null, 1E-8);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function providerCOUPDAYBS()
|
public function providerCOUPDAYBS()
|
||||||
|
@ -105,7 +105,7 @@ class FinancialTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_Financial','COUPDAYS'),$args);
|
$result = call_user_func_array(array('PHPExcel_Calculation_Financial','COUPDAYS'),$args);
|
||||||
$this->assertEquals($expectedResult, $result, NULL, 1E-8);
|
$this->assertEquals($expectedResult, $result, null, 1E-8);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function providerCOUPDAYS()
|
public function providerCOUPDAYS()
|
||||||
|
@ -121,7 +121,7 @@ class FinancialTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_Financial','COUPDAYSNC'),$args);
|
$result = call_user_func_array(array('PHPExcel_Calculation_Financial','COUPDAYSNC'),$args);
|
||||||
$this->assertEquals($expectedResult, $result, NULL, 1E-8);
|
$this->assertEquals($expectedResult, $result, null, 1E-8);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function providerCOUPDAYSNC()
|
public function providerCOUPDAYSNC()
|
||||||
|
@ -137,7 +137,7 @@ class FinancialTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_Financial','COUPNCD'),$args);
|
$result = call_user_func_array(array('PHPExcel_Calculation_Financial','COUPNCD'),$args);
|
||||||
$this->assertEquals($expectedResult, $result, NULL, 1E-8);
|
$this->assertEquals($expectedResult, $result, null, 1E-8);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function providerCOUPNCD()
|
public function providerCOUPNCD()
|
||||||
|
@ -153,7 +153,7 @@ class FinancialTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_Financial','COUPNUM'),$args);
|
$result = call_user_func_array(array('PHPExcel_Calculation_Financial','COUPNUM'),$args);
|
||||||
$this->assertEquals($expectedResult, $result, NULL, 1E-8);
|
$this->assertEquals($expectedResult, $result, null, 1E-8);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function providerCOUPNUM()
|
public function providerCOUPNUM()
|
||||||
|
@ -169,7 +169,7 @@ class FinancialTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_Financial','COUPPCD'),$args);
|
$result = call_user_func_array(array('PHPExcel_Calculation_Financial','COUPPCD'),$args);
|
||||||
$this->assertEquals($expectedResult, $result, NULL, 1E-8);
|
$this->assertEquals($expectedResult, $result, null, 1E-8);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function providerCOUPPCD()
|
public function providerCOUPPCD()
|
||||||
|
@ -185,7 +185,7 @@ class FinancialTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_Financial','CUMIPMT'),$args);
|
$result = call_user_func_array(array('PHPExcel_Calculation_Financial','CUMIPMT'),$args);
|
||||||
$this->assertEquals($expectedResult, $result, NULL, 1E-8);
|
$this->assertEquals($expectedResult, $result, null, 1E-8);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function providerCUMIPMT()
|
public function providerCUMIPMT()
|
||||||
|
@ -201,7 +201,7 @@ class FinancialTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_Financial','CUMPRINC'),$args);
|
$result = call_user_func_array(array('PHPExcel_Calculation_Financial','CUMPRINC'),$args);
|
||||||
$this->assertEquals($expectedResult, $result, NULL, 1E-8);
|
$this->assertEquals($expectedResult, $result, null, 1E-8);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function providerCUMPRINC()
|
public function providerCUMPRINC()
|
||||||
|
@ -217,7 +217,7 @@ class FinancialTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_Financial','DB'),$args);
|
$result = call_user_func_array(array('PHPExcel_Calculation_Financial','DB'),$args);
|
||||||
$this->assertEquals($expectedResult, $result, NULL, 1E-8);
|
$this->assertEquals($expectedResult, $result, null, 1E-8);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function providerDB()
|
public function providerDB()
|
||||||
|
@ -233,7 +233,7 @@ class FinancialTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_Financial','DDB'),$args);
|
$result = call_user_func_array(array('PHPExcel_Calculation_Financial','DDB'),$args);
|
||||||
$this->assertEquals($expectedResult, $result, NULL, 1E-8);
|
$this->assertEquals($expectedResult, $result, null, 1E-8);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function providerDDB()
|
public function providerDDB()
|
||||||
|
@ -249,7 +249,7 @@ class FinancialTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_Financial','DISC'),$args);
|
$result = call_user_func_array(array('PHPExcel_Calculation_Financial','DISC'),$args);
|
||||||
$this->assertEquals($expectedResult, $result, NULL, 1E-8);
|
$this->assertEquals($expectedResult, $result, null, 1E-8);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function providerDISC()
|
public function providerDISC()
|
||||||
|
@ -265,7 +265,7 @@ class FinancialTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_Financial','DOLLARDE'),$args);
|
$result = call_user_func_array(array('PHPExcel_Calculation_Financial','DOLLARDE'),$args);
|
||||||
$this->assertEquals($expectedResult, $result, NULL, 1E-8);
|
$this->assertEquals($expectedResult, $result, null, 1E-8);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function providerDOLLARDE()
|
public function providerDOLLARDE()
|
||||||
|
@ -281,7 +281,7 @@ class FinancialTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_Financial','DOLLARFR'),$args);
|
$result = call_user_func_array(array('PHPExcel_Calculation_Financial','DOLLARFR'),$args);
|
||||||
$this->assertEquals($expectedResult, $result, NULL, 1E-8);
|
$this->assertEquals($expectedResult, $result, null, 1E-8);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function providerDOLLARFR()
|
public function providerDOLLARFR()
|
||||||
|
@ -297,7 +297,7 @@ class FinancialTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_Financial','EFFECT'),$args);
|
$result = call_user_func_array(array('PHPExcel_Calculation_Financial','EFFECT'),$args);
|
||||||
$this->assertEquals($expectedResult, $result, NULL, 1E-8);
|
$this->assertEquals($expectedResult, $result, null, 1E-8);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function providerEFFECT()
|
public function providerEFFECT()
|
||||||
|
@ -313,7 +313,7 @@ class FinancialTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_Financial','FV'),$args);
|
$result = call_user_func_array(array('PHPExcel_Calculation_Financial','FV'),$args);
|
||||||
$this->assertEquals($expectedResult, $result, NULL, 1E-8);
|
$this->assertEquals($expectedResult, $result, null, 1E-8);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function providerFV()
|
public function providerFV()
|
||||||
|
@ -329,7 +329,7 @@ class FinancialTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_Financial','FVSCHEDULE'),$args);
|
$result = call_user_func_array(array('PHPExcel_Calculation_Financial','FVSCHEDULE'),$args);
|
||||||
$this->assertEquals($expectedResult, $result, NULL, 1E-8);
|
$this->assertEquals($expectedResult, $result, null, 1E-8);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function providerFVSCHEDULE()
|
public function providerFVSCHEDULE()
|
||||||
|
@ -345,7 +345,7 @@ class FinancialTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_Financial','INTRATE'),$args);
|
$result = call_user_func_array(array('PHPExcel_Calculation_Financial','INTRATE'),$args);
|
||||||
$this->assertEquals($expectedResult, $result, NULL, 1E-8);
|
$this->assertEquals($expectedResult, $result, null, 1E-8);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function providerINTRATE()
|
public function providerINTRATE()
|
||||||
|
@ -361,7 +361,7 @@ class FinancialTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_Financial','IPMT'),$args);
|
$result = call_user_func_array(array('PHPExcel_Calculation_Financial','IPMT'),$args);
|
||||||
$this->assertEquals($expectedResult, $result, NULL, 1E-8);
|
$this->assertEquals($expectedResult, $result, null, 1E-8);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function providerIPMT()
|
public function providerIPMT()
|
||||||
|
@ -377,7 +377,7 @@ class FinancialTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_Financial','IRR'),$args);
|
$result = call_user_func_array(array('PHPExcel_Calculation_Financial','IRR'),$args);
|
||||||
$this->assertEquals($expectedResult, $result, NULL, 1E-8);
|
$this->assertEquals($expectedResult, $result, null, 1E-8);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function providerIRR()
|
public function providerIRR()
|
||||||
|
@ -393,7 +393,7 @@ class FinancialTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_Financial','ISPMT'),$args);
|
$result = call_user_func_array(array('PHPExcel_Calculation_Financial','ISPMT'),$args);
|
||||||
$this->assertEquals($expectedResult, $result, NULL, 1E-8);
|
$this->assertEquals($expectedResult, $result, null, 1E-8);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function providerISPMT()
|
public function providerISPMT()
|
||||||
|
@ -409,7 +409,7 @@ class FinancialTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_Financial','MIRR'),$args);
|
$result = call_user_func_array(array('PHPExcel_Calculation_Financial','MIRR'),$args);
|
||||||
$this->assertEquals($expectedResult, $result, NULL, 1E-8);
|
$this->assertEquals($expectedResult, $result, null, 1E-8);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function providerMIRR()
|
public function providerMIRR()
|
||||||
|
@ -425,7 +425,7 @@ class FinancialTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_Financial','NOMINAL'),$args);
|
$result = call_user_func_array(array('PHPExcel_Calculation_Financial','NOMINAL'),$args);
|
||||||
$this->assertEquals($expectedResult, $result, NULL, 1E-8);
|
$this->assertEquals($expectedResult, $result, null, 1E-8);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function providerNOMINAL()
|
public function providerNOMINAL()
|
||||||
|
@ -441,7 +441,7 @@ class FinancialTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_Financial','NPER'),$args);
|
$result = call_user_func_array(array('PHPExcel_Calculation_Financial','NPER'),$args);
|
||||||
$this->assertEquals($expectedResult, $result, NULL, 1E-8);
|
$this->assertEquals($expectedResult, $result, null, 1E-8);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function providerNPER()
|
public function providerNPER()
|
||||||
|
@ -457,7 +457,7 @@ class FinancialTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_Financial','NPV'),$args);
|
$result = call_user_func_array(array('PHPExcel_Calculation_Financial','NPV'),$args);
|
||||||
$this->assertEquals($expectedResult, $result, NULL, 1E-8);
|
$this->assertEquals($expectedResult, $result, null, 1E-8);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function providerNPV()
|
public function providerNPV()
|
||||||
|
@ -473,7 +473,7 @@ class FinancialTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_Financial','PRICE'),$args);
|
$result = call_user_func_array(array('PHPExcel_Calculation_Financial','PRICE'),$args);
|
||||||
$this->assertEquals($expectedResult, $result, NULL, 1E-8);
|
$this->assertEquals($expectedResult, $result, null, 1E-8);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function providerPRICE()
|
public function providerPRICE()
|
||||||
|
@ -489,7 +489,7 @@ class FinancialTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_Financial','RATE'),$args);
|
$result = call_user_func_array(array('PHPExcel_Calculation_Financial','RATE'),$args);
|
||||||
$this->assertEquals($expectedResult, $result, NULL, 1E-8);
|
$this->assertEquals($expectedResult, $result, null, 1E-8);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function providerRATE()
|
public function providerRATE()
|
||||||
|
@ -505,7 +505,7 @@ class FinancialTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_Financial','XIRR'),$args);
|
$result = call_user_func_array(array('PHPExcel_Calculation_Financial','XIRR'),$args);
|
||||||
$this->assertEquals($expectedResult, $result, NULL, 1E-8);
|
$this->assertEquals($expectedResult, $result, null, 1E-8);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function providerXIRR()
|
public function providerXIRR()
|
||||||
|
|
|
@ -55,7 +55,7 @@ class FunctionsTest extends PHPUnit_Framework_TestCase
|
||||||
|
|
||||||
public function testNULL()
|
public function testNULL()
|
||||||
{
|
{
|
||||||
$result = PHPExcel_Calculation_Functions::NULL();
|
$result = PHPExcel_Calculation_Functions::null();
|
||||||
$this->assertEquals('#NULL!', $result);
|
$this->assertEquals('#NULL!', $result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -73,7 +73,7 @@ class FunctionsTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_Functions','IS_BLANK'),$args);
|
$result = call_user_func_array(array('PHPExcel_Calculation_Functions','IS_BLANK'),$args);
|
||||||
$this->assertEquals($expectedResult, $result, NULL, 1E-8);
|
$this->assertEquals($expectedResult, $result, null, 1E-8);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function providerIS_BLANK()
|
public function providerIS_BLANK()
|
||||||
|
@ -89,7 +89,7 @@ class FunctionsTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_Functions','IS_ERR'),$args);
|
$result = call_user_func_array(array('PHPExcel_Calculation_Functions','IS_ERR'),$args);
|
||||||
$this->assertEquals($expectedResult, $result, NULL, 1E-8);
|
$this->assertEquals($expectedResult, $result, null, 1E-8);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function providerIS_ERR()
|
public function providerIS_ERR()
|
||||||
|
@ -105,7 +105,7 @@ class FunctionsTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_Functions','IS_ERROR'),$args);
|
$result = call_user_func_array(array('PHPExcel_Calculation_Functions','IS_ERROR'),$args);
|
||||||
$this->assertEquals($expectedResult, $result, NULL, 1E-8);
|
$this->assertEquals($expectedResult, $result, null, 1E-8);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function providerIS_ERROR()
|
public function providerIS_ERROR()
|
||||||
|
@ -121,7 +121,7 @@ class FunctionsTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_Functions','ERROR_TYPE'),$args);
|
$result = call_user_func_array(array('PHPExcel_Calculation_Functions','ERROR_TYPE'),$args);
|
||||||
$this->assertEquals($expectedResult, $result, NULL, 1E-8);
|
$this->assertEquals($expectedResult, $result, null, 1E-8);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function providerERROR_TYPE()
|
public function providerERROR_TYPE()
|
||||||
|
@ -137,7 +137,7 @@ class FunctionsTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_Functions','IS_LOGICAL'),$args);
|
$result = call_user_func_array(array('PHPExcel_Calculation_Functions','IS_LOGICAL'),$args);
|
||||||
$this->assertEquals($expectedResult, $result, NULL, 1E-8);
|
$this->assertEquals($expectedResult, $result, null, 1E-8);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function providerIS_LOGICAL()
|
public function providerIS_LOGICAL()
|
||||||
|
@ -153,7 +153,7 @@ class FunctionsTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_Functions','IS_NA'),$args);
|
$result = call_user_func_array(array('PHPExcel_Calculation_Functions','IS_NA'),$args);
|
||||||
$this->assertEquals($expectedResult, $result, NULL, 1E-8);
|
$this->assertEquals($expectedResult, $result, null, 1E-8);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function providerIS_NA()
|
public function providerIS_NA()
|
||||||
|
@ -169,7 +169,7 @@ class FunctionsTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_Functions','IS_NUMBER'),$args);
|
$result = call_user_func_array(array('PHPExcel_Calculation_Functions','IS_NUMBER'),$args);
|
||||||
$this->assertEquals($expectedResult, $result, NULL, 1E-8);
|
$this->assertEquals($expectedResult, $result, null, 1E-8);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function providerIS_NUMBER()
|
public function providerIS_NUMBER()
|
||||||
|
@ -185,7 +185,7 @@ class FunctionsTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_Functions','IS_TEXT'),$args);
|
$result = call_user_func_array(array('PHPExcel_Calculation_Functions','IS_TEXT'),$args);
|
||||||
$this->assertEquals($expectedResult, $result, NULL, 1E-8);
|
$this->assertEquals($expectedResult, $result, null, 1E-8);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function providerIS_TEXT()
|
public function providerIS_TEXT()
|
||||||
|
@ -201,7 +201,7 @@ class FunctionsTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_Functions','IS_NONTEXT'),$args);
|
$result = call_user_func_array(array('PHPExcel_Calculation_Functions','IS_NONTEXT'),$args);
|
||||||
$this->assertEquals($expectedResult, $result, NULL, 1E-8);
|
$this->assertEquals($expectedResult, $result, null, 1E-8);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function providerIS_NONTEXT()
|
public function providerIS_NONTEXT()
|
||||||
|
@ -217,7 +217,7 @@ class FunctionsTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_Functions','IS_EVEN'),$args);
|
$result = call_user_func_array(array('PHPExcel_Calculation_Functions','IS_EVEN'),$args);
|
||||||
$this->assertEquals($expectedResult, $result, NULL, 1E-8);
|
$this->assertEquals($expectedResult, $result, null, 1E-8);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function providerIS_EVEN()
|
public function providerIS_EVEN()
|
||||||
|
@ -233,7 +233,7 @@ class FunctionsTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_Functions','IS_ODD'),$args);
|
$result = call_user_func_array(array('PHPExcel_Calculation_Functions','IS_ODD'),$args);
|
||||||
$this->assertEquals($expectedResult, $result, NULL, 1E-8);
|
$this->assertEquals($expectedResult, $result, null, 1E-8);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function providerIS_ODD()
|
public function providerIS_ODD()
|
||||||
|
@ -249,7 +249,7 @@ class FunctionsTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_Functions','TYPE'),$args);
|
$result = call_user_func_array(array('PHPExcel_Calculation_Functions','TYPE'),$args);
|
||||||
$this->assertEquals($expectedResult, $result, NULL, 1E-8);
|
$this->assertEquals($expectedResult, $result, null, 1E-8);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function providerTYPE()
|
public function providerTYPE()
|
||||||
|
@ -265,7 +265,7 @@ class FunctionsTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_Functions','N'),$args);
|
$result = call_user_func_array(array('PHPExcel_Calculation_Functions','N'),$args);
|
||||||
$this->assertEquals($expectedResult, $result, NULL, 1E-8);
|
$this->assertEquals($expectedResult, $result, null, 1E-8);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function providerN()
|
public function providerN()
|
||||||
|
|
|
@ -20,13 +20,13 @@ class LogicalTest extends PHPUnit_Framework_TestCase
|
||||||
public function testTRUE()
|
public function testTRUE()
|
||||||
{
|
{
|
||||||
$result = PHPExcel_Calculation_Logical::TRUE();
|
$result = PHPExcel_Calculation_Logical::TRUE();
|
||||||
$this->assertEquals(TRUE, $result);
|
$this->assertEquals(true, $result);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testFALSE()
|
public function testFALSE()
|
||||||
{
|
{
|
||||||
$result = PHPExcel_Calculation_Logical::FALSE();
|
$result = PHPExcel_Calculation_Logical::FALSE();
|
||||||
$this->assertEquals(FALSE, $result);
|
$this->assertEquals(false, $result);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -25,7 +25,7 @@ class MathTrigTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','ATAN2'),$args);
|
$result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','ATAN2'),$args);
|
||||||
$this->assertEquals($expectedResult, $result, NULL, 1E-12);
|
$this->assertEquals($expectedResult, $result, null, 1E-12);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function providerATAN2()
|
public function providerATAN2()
|
||||||
|
@ -41,7 +41,7 @@ class MathTrigTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','CEILING'),$args);
|
$result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','CEILING'),$args);
|
||||||
$this->assertEquals($expectedResult, $result, NULL, 1E-12);
|
$this->assertEquals($expectedResult, $result, null, 1E-12);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function providerCEILING()
|
public function providerCEILING()
|
||||||
|
@ -57,7 +57,7 @@ class MathTrigTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','COMBIN'),$args);
|
$result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','COMBIN'),$args);
|
||||||
$this->assertEquals($expectedResult, $result, NULL, 1E-12);
|
$this->assertEquals($expectedResult, $result, null, 1E-12);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function providerCOMBIN()
|
public function providerCOMBIN()
|
||||||
|
@ -73,7 +73,7 @@ class MathTrigTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','EVEN'),$args);
|
$result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','EVEN'),$args);
|
||||||
$this->assertEquals($expectedResult, $result, NULL, 1E-12);
|
$this->assertEquals($expectedResult, $result, null, 1E-12);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function providerEVEN()
|
public function providerEVEN()
|
||||||
|
@ -89,7 +89,7 @@ class MathTrigTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','ODD'),$args);
|
$result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','ODD'),$args);
|
||||||
$this->assertEquals($expectedResult, $result, NULL, 1E-12);
|
$this->assertEquals($expectedResult, $result, null, 1E-12);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function providerODD()
|
public function providerODD()
|
||||||
|
@ -105,7 +105,7 @@ class MathTrigTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','FACT'),$args);
|
$result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','FACT'),$args);
|
||||||
$this->assertEquals($expectedResult, $result, NULL, 1E-12);
|
$this->assertEquals($expectedResult, $result, null, 1E-12);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function providerFACT()
|
public function providerFACT()
|
||||||
|
@ -121,7 +121,7 @@ class MathTrigTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','FACTDOUBLE'),$args);
|
$result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','FACTDOUBLE'),$args);
|
||||||
$this->assertEquals($expectedResult, $result, NULL, 1E-12);
|
$this->assertEquals($expectedResult, $result, null, 1E-12);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function providerFACTDOUBLE()
|
public function providerFACTDOUBLE()
|
||||||
|
@ -137,7 +137,7 @@ class MathTrigTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','FLOOR'),$args);
|
$result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','FLOOR'),$args);
|
||||||
$this->assertEquals($expectedResult, $result, NULL, 1E-12);
|
$this->assertEquals($expectedResult, $result, null, 1E-12);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function providerFLOOR()
|
public function providerFLOOR()
|
||||||
|
@ -153,7 +153,7 @@ class MathTrigTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','GCD'),$args);
|
$result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','GCD'),$args);
|
||||||
$this->assertEquals($expectedResult, $result, NULL, 1E-12);
|
$this->assertEquals($expectedResult, $result, null, 1E-12);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function providerGCD()
|
public function providerGCD()
|
||||||
|
@ -169,7 +169,7 @@ class MathTrigTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','LCM'),$args);
|
$result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','LCM'),$args);
|
||||||
$this->assertEquals($expectedResult, $result, NULL, 1E-12);
|
$this->assertEquals($expectedResult, $result, null, 1E-12);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function providerLCM()
|
public function providerLCM()
|
||||||
|
@ -201,7 +201,7 @@ class MathTrigTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','SIGN'),$args);
|
$result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','SIGN'),$args);
|
||||||
$this->assertEquals($expectedResult, $result, NULL, 1E-12);
|
$this->assertEquals($expectedResult, $result, null, 1E-12);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function providerSIGN()
|
public function providerSIGN()
|
||||||
|
@ -217,7 +217,7 @@ class MathTrigTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','POWER'),$args);
|
$result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','POWER'),$args);
|
||||||
$this->assertEquals($expectedResult, $result, NULL, 1E-12);
|
$this->assertEquals($expectedResult, $result, null, 1E-12);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function providerPOWER()
|
public function providerPOWER()
|
||||||
|
@ -233,7 +233,7 @@ class MathTrigTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','LOG_BASE'),$args);
|
$result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','LOG_BASE'),$args);
|
||||||
$this->assertEquals($expectedResult, $result, NULL, 1E-12);
|
$this->assertEquals($expectedResult, $result, null, 1E-12);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function providerLOG()
|
public function providerLOG()
|
||||||
|
@ -249,7 +249,7 @@ class MathTrigTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','MOD'),$args);
|
$result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','MOD'),$args);
|
||||||
$this->assertEquals($expectedResult, $result, NULL, 1E-12);
|
$this->assertEquals($expectedResult, $result, null, 1E-12);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function providerMOD()
|
public function providerMOD()
|
||||||
|
@ -265,7 +265,7 @@ class MathTrigTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','MDETERM'),$args);
|
$result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','MDETERM'),$args);
|
||||||
$this->assertEquals($expectedResult, $result, NULL, 1E-12);
|
$this->assertEquals($expectedResult, $result, null, 1E-12);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function providerMDETERM()
|
public function providerMDETERM()
|
||||||
|
@ -281,7 +281,7 @@ class MathTrigTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','MINVERSE'),$args);
|
$result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','MINVERSE'),$args);
|
||||||
$this->assertEquals($expectedResult, $result, NULL, 1E-12);
|
$this->assertEquals($expectedResult, $result, null, 1E-12);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function providerMINVERSE()
|
public function providerMINVERSE()
|
||||||
|
@ -297,7 +297,7 @@ class MathTrigTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','MMULT'),$args);
|
$result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','MMULT'),$args);
|
||||||
$this->assertEquals($expectedResult, $result, NULL, 1E-12);
|
$this->assertEquals($expectedResult, $result, null, 1E-12);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function providerMMULT()
|
public function providerMMULT()
|
||||||
|
@ -313,7 +313,7 @@ class MathTrigTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','MULTINOMIAL'),$args);
|
$result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','MULTINOMIAL'),$args);
|
||||||
$this->assertEquals($expectedResult, $result, NULL, 1E-12);
|
$this->assertEquals($expectedResult, $result, null, 1E-12);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function providerMULTINOMIAL()
|
public function providerMULTINOMIAL()
|
||||||
|
@ -331,7 +331,7 @@ class MathTrigTest extends PHPUnit_Framework_TestCase
|
||||||
PHPExcel_Calculation::setArrayReturnType(PHPExcel_Calculation::RETURN_ARRAY_AS_VALUE);
|
PHPExcel_Calculation::setArrayReturnType(PHPExcel_Calculation::RETURN_ARRAY_AS_VALUE);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','MROUND'),$args);
|
$result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','MROUND'),$args);
|
||||||
PHPExcel_Calculation::setArrayReturnType(PHPExcel_Calculation::RETURN_ARRAY_AS_ARRAY);
|
PHPExcel_Calculation::setArrayReturnType(PHPExcel_Calculation::RETURN_ARRAY_AS_ARRAY);
|
||||||
$this->assertEquals($expectedResult, $result, NULL, 1E-12);
|
$this->assertEquals($expectedResult, $result, null, 1E-12);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function providerMROUND()
|
public function providerMROUND()
|
||||||
|
@ -347,7 +347,7 @@ class MathTrigTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','PRODUCT'),$args);
|
$result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','PRODUCT'),$args);
|
||||||
$this->assertEquals($expectedResult, $result, NULL, 1E-12);
|
$this->assertEquals($expectedResult, $result, null, 1E-12);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function providerPRODUCT()
|
public function providerPRODUCT()
|
||||||
|
@ -363,7 +363,7 @@ class MathTrigTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','QUOTIENT'),$args);
|
$result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','QUOTIENT'),$args);
|
||||||
$this->assertEquals($expectedResult, $result, NULL, 1E-12);
|
$this->assertEquals($expectedResult, $result, null, 1E-12);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function providerQUOTIENT()
|
public function providerQUOTIENT()
|
||||||
|
@ -379,7 +379,7 @@ class MathTrigTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','ROUNDUP'),$args);
|
$result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','ROUNDUP'),$args);
|
||||||
$this->assertEquals($expectedResult, $result, NULL, 1E-12);
|
$this->assertEquals($expectedResult, $result, null, 1E-12);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function providerROUNDUP()
|
public function providerROUNDUP()
|
||||||
|
@ -395,7 +395,7 @@ class MathTrigTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','ROUNDDOWN'),$args);
|
$result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','ROUNDDOWN'),$args);
|
||||||
$this->assertEquals($expectedResult, $result, NULL, 1E-12);
|
$this->assertEquals($expectedResult, $result, null, 1E-12);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function providerROUNDDOWN()
|
public function providerROUNDDOWN()
|
||||||
|
@ -411,7 +411,7 @@ class MathTrigTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','SERIESSUM'),$args);
|
$result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','SERIESSUM'),$args);
|
||||||
$this->assertEquals($expectedResult, $result, NULL, 1E-12);
|
$this->assertEquals($expectedResult, $result, null, 1E-12);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function providerSERIESSUM()
|
public function providerSERIESSUM()
|
||||||
|
@ -427,7 +427,7 @@ class MathTrigTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','SUMSQ'),$args);
|
$result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','SUMSQ'),$args);
|
||||||
$this->assertEquals($expectedResult, $result, NULL, 1E-12);
|
$this->assertEquals($expectedResult, $result, null, 1E-12);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function providerSUMSQ()
|
public function providerSUMSQ()
|
||||||
|
@ -443,7 +443,7 @@ class MathTrigTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','TRUNC'),$args);
|
$result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','TRUNC'),$args);
|
||||||
$this->assertEquals($expectedResult, $result, NULL, 1E-12);
|
$this->assertEquals($expectedResult, $result, null, 1E-12);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function providerTRUNC()
|
public function providerTRUNC()
|
||||||
|
@ -475,7 +475,7 @@ class MathTrigTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','SQRTPI'),$args);
|
$result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','SQRTPI'),$args);
|
||||||
$this->assertEquals($expectedResult, $result, NULL, 1E-12);
|
$this->assertEquals($expectedResult, $result, null, 1E-12);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function providerSQRTPI()
|
public function providerSQRTPI()
|
||||||
|
@ -491,7 +491,7 @@ class MathTrigTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_MathTrig', 'SUMIF'), $args);
|
$result = call_user_func_array(array('PHPExcel_Calculation_MathTrig', 'SUMIF'), $args);
|
||||||
$this->assertEquals($expectedResult, $result, NULL, 1E-12);
|
$this->assertEquals($expectedResult, $result, null, 1E-12);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function providerSUMIF()
|
public function providerSUMIF()
|
||||||
|
|
|
@ -354,7 +354,7 @@ class TextDataTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Calculation_TextData','VALUE'),$args);
|
$result = call_user_func_array(array('PHPExcel_Calculation_TextData','VALUE'),$args);
|
||||||
$this->assertEquals($expectedResult, $result, NULL, 1E-8);
|
$this->assertEquals($expectedResult, $result, null, 1E-8);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function providerVALUE()
|
public function providerVALUE()
|
||||||
|
|
|
@ -64,7 +64,7 @@ class AdvancedValueBinderTest extends PHPUnit_Framework_TestCase
|
||||||
PHPExcel_Shared_String::setDecimalSeparator($decimalSeparator);
|
PHPExcel_Shared_String::setDecimalSeparator($decimalSeparator);
|
||||||
PHPExcel_Shared_String::setThousandsSeparator($thousandsSeparator);
|
PHPExcel_Shared_String::setThousandsSeparator($thousandsSeparator);
|
||||||
|
|
||||||
$cell = new PHPExcel_Cell(NULL, PHPExcel_Cell_DataType::TYPE_STRING, $sheet);
|
$cell = new PHPExcel_Cell(null, PHPExcel_Cell_DataType::TYPE_STRING, $sheet);
|
||||||
|
|
||||||
$binder = new PHPExcel_Cell_AdvancedValueBinder();
|
$binder = new PHPExcel_Cell_AdvancedValueBinder();
|
||||||
$binder->bindValue($cell, $value);
|
$binder->bindValue($cell, $value);
|
||||||
|
|
|
@ -40,7 +40,7 @@ class HyperlinkTest extends PHPUnit_Framework_TestCase
|
||||||
{
|
{
|
||||||
$tooltipValue = 'PHPExcel Web Site';
|
$tooltipValue = 'PHPExcel Web Site';
|
||||||
|
|
||||||
$testInstance = new PHPExcel_Cell_Hyperlink(NULL, $tooltipValue);
|
$testInstance = new PHPExcel_Cell_Hyperlink(null, $tooltipValue);
|
||||||
|
|
||||||
$result = $testInstance->getTooltip();
|
$result = $testInstance->getTooltip();
|
||||||
$this->assertEquals($tooltipValue,$result);
|
$this->assertEquals($tooltipValue,$result);
|
||||||
|
@ -51,7 +51,7 @@ class HyperlinkTest extends PHPUnit_Framework_TestCase
|
||||||
$initialTooltipValue = 'PHPExcel Web Site';
|
$initialTooltipValue = 'PHPExcel Web Site';
|
||||||
$newTooltipValue = 'PHPExcel Repository on Github';
|
$newTooltipValue = 'PHPExcel Repository on Github';
|
||||||
|
|
||||||
$testInstance = new PHPExcel_Cell_Hyperlink(NULL, $initialTooltipValue);
|
$testInstance = new PHPExcel_Cell_Hyperlink(null, $initialTooltipValue);
|
||||||
$result = $testInstance->setTooltip($newTooltipValue);
|
$result = $testInstance->setTooltip($newTooltipValue);
|
||||||
$this->assertTrue($result instanceof PHPExcel_Cell_Hyperlink);
|
$this->assertTrue($result instanceof PHPExcel_Cell_Hyperlink);
|
||||||
|
|
||||||
|
|
|
@ -97,8 +97,8 @@ class LegendTest extends PHPUnit_Framework_TestCase
|
||||||
public function testSetOverlay()
|
public function testSetOverlay()
|
||||||
{
|
{
|
||||||
$overlayValues = array(
|
$overlayValues = array(
|
||||||
TRUE,
|
true,
|
||||||
FALSE,
|
false,
|
||||||
);
|
);
|
||||||
|
|
||||||
$testInstance = new PHPExcel_Chart_Legend;
|
$testInstance = new PHPExcel_Chart_Legend;
|
||||||
|
@ -122,7 +122,7 @@ class LegendTest extends PHPUnit_Framework_TestCase
|
||||||
|
|
||||||
public function testGetOverlay()
|
public function testGetOverlay()
|
||||||
{
|
{
|
||||||
$OverlayValue = TRUE;
|
$OverlayValue = true;
|
||||||
|
|
||||||
$testInstance = new PHPExcel_Chart_Legend;
|
$testInstance = new PHPExcel_Chart_Legend;
|
||||||
$setValue = $testInstance->setOverlay($OverlayValue);
|
$setValue = $testInstance->setOverlay($OverlayValue);
|
||||||
|
|
|
@ -71,7 +71,7 @@ class DateTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Shared_Date','PHPToExcel'),$args);
|
$result = call_user_func_array(array('PHPExcel_Shared_Date','PHPToExcel'),$args);
|
||||||
$this->assertEquals($expectedResult, $result, NULL, 1E-5);
|
$this->assertEquals($expectedResult, $result, null, 1E-5);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function providerDateTimePHPToExcel1900()
|
public function providerDateTimePHPToExcel1900()
|
||||||
|
@ -92,7 +92,7 @@ class DateTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Shared_Date','FormattedPHPToExcel'),$args);
|
$result = call_user_func_array(array('PHPExcel_Shared_Date','FormattedPHPToExcel'),$args);
|
||||||
$this->assertEquals($expectedResult, $result, NULL, 1E-5);
|
$this->assertEquals($expectedResult, $result, null, 1E-5);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function providerDateTimeFormattedPHPToExcel1900()
|
public function providerDateTimeFormattedPHPToExcel1900()
|
||||||
|
@ -137,7 +137,7 @@ class DateTest extends PHPUnit_Framework_TestCase
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
$result = call_user_func_array(array('PHPExcel_Shared_Date','PHPToExcel'),$args);
|
$result = call_user_func_array(array('PHPExcel_Shared_Date','PHPToExcel'),$args);
|
||||||
$this->assertEquals($expectedResult, $result, NULL, 1E-5);
|
$this->assertEquals($expectedResult, $result, null, 1E-5);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function providerDateTimePHPToExcel1904()
|
public function providerDateTimePHPToExcel1904()
|
||||||
|
|
|
@ -25,8 +25,8 @@ class FileTest extends PHPUnit_Framework_TestCase
|
||||||
public function testSetUseUploadTempDirectory()
|
public function testSetUseUploadTempDirectory()
|
||||||
{
|
{
|
||||||
$useUploadTempDirectoryValues = array(
|
$useUploadTempDirectoryValues = array(
|
||||||
TRUE,
|
true,
|
||||||
FALSE,
|
false,
|
||||||
);
|
);
|
||||||
|
|
||||||
foreach ($useUploadTempDirectoryValues as $useUploadTempDirectoryValue) {
|
foreach ($useUploadTempDirectoryValues as $useUploadTempDirectoryValue) {
|
||||||
|
|
|
@ -85,13 +85,14 @@ class testDataFileIterator implements Iterator
|
||||||
return $data;
|
return $data;
|
||||||
}
|
}
|
||||||
|
|
||||||
private function _parseDataValue($dataValue) {
|
private function _parseDataValue($dataValue)
|
||||||
|
{
|
||||||
// discard any white space
|
// discard any white space
|
||||||
$dataValue = trim($dataValue);
|
$dataValue = trim($dataValue);
|
||||||
// test for the required datatype and convert accordingly
|
// test for the required datatype and convert accordingly
|
||||||
if (!is_numeric($dataValue)) {
|
if (!is_numeric($dataValue)) {
|
||||||
if($dataValue == '') {
|
if($dataValue == '') {
|
||||||
$dataValue = NULL;
|
$dataValue = null;
|
||||||
} elseif($dataValue == '""') {
|
} elseif($dataValue == '""') {
|
||||||
$dataValue = '';
|
$dataValue = '';
|
||||||
} elseif(($dataValue[0] == '"') && ($dataValue[strlen($dataValue)-1] == '"')) {
|
} elseif(($dataValue[0] == '"') && ($dataValue[strlen($dataValue)-1] == '"')) {
|
||||||
|
@ -99,7 +100,7 @@ class testDataFileIterator implements Iterator
|
||||||
} elseif(($dataValue[0] == '{') && ($dataValue[strlen($dataValue)-1] == '}')) {
|
} elseif(($dataValue[0] == '{') && ($dataValue[strlen($dataValue)-1] == '}')) {
|
||||||
$dataValue = explode(';',substr($dataValue,1,-1));
|
$dataValue = explode(';',substr($dataValue,1,-1));
|
||||||
foreach ($dataValue as &$dataRow) {
|
foreach ($dataValue as &$dataRow) {
|
||||||
if (strpos($dataRow,'|') !== FALSE) {
|
if (strpos($dataRow,'|') !== false) {
|
||||||
$dataRow = explode('|',$dataRow);
|
$dataRow = explode('|',$dataRow);
|
||||||
foreach ($dataRow as &$dataCell) {
|
foreach ($dataRow as &$dataCell) {
|
||||||
$dataCell = $this->_parseDataValue($dataCell);
|
$dataCell = $this->_parseDataValue($dataCell);
|
||||||
|
@ -112,13 +113,19 @@ class testDataFileIterator implements Iterator
|
||||||
unset($dataRow);
|
unset($dataRow);
|
||||||
} else {
|
} else {
|
||||||
switch (strtoupper($dataValue)) {
|
switch (strtoupper($dataValue)) {
|
||||||
case 'NULL' : $dataValue = NULL; break;
|
case 'NULL':
|
||||||
case 'TRUE' : $dataValue = TRUE; break;
|
$dataValue = null;
|
||||||
case 'FALSE' : $dataValue = FALSE; break;
|
break;
|
||||||
|
case 'TRUE':
|
||||||
|
$dataValue = true;
|
||||||
|
break;
|
||||||
|
case 'FALSE':
|
||||||
|
$dataValue = false;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (strpos($dataValue,'.') !== FALSE) {
|
if (strpos($dataValue,'.') !== false) {
|
||||||
$dataValue = (float) $dataValue;
|
$dataValue = (float) $dataValue;
|
||||||
} else {
|
} else {
|
||||||
$dataValue = (int) $dataValue;
|
$dataValue = (int) $dataValue;
|
||||||
|
@ -127,5 +134,4 @@ class testDataFileIterator implements Iterator
|
||||||
|
|
||||||
return $dataValue;
|
return $dataValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue