mirror of
https://github.com/retailcrm/PHPExcel.git
synced 2024-11-25 14:56:04 +03:00
PSR2 Fixes
This commit is contained in:
parent
576effef30
commit
b6bc0db105
@ -391,7 +391,7 @@ class PHPExcel_Worksheet implements PHPExcel_IComparable
|
|||||||
* Code to execute when this worksheet is unset()
|
* Code to execute when this worksheet is unset()
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
function __destruct()
|
public function __destruct()
|
||||||
{
|
{
|
||||||
PHPExcel_Calculation::getInstance($this->_parent)->clearCalculationCacheForWorksheet($this->_title);
|
PHPExcel_Calculation::getInstance($this->_parent)->clearCalculationCacheForWorksheet($this->_title);
|
||||||
|
|
||||||
|
@ -6,8 +6,7 @@ class AutoloaderTest extends PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
public function setUp()
|
public function setUp()
|
||||||
{
|
{
|
||||||
if (!defined('PHPEXCEL_ROOT'))
|
if (!defined('PHPEXCEL_ROOT')) {
|
||||||
{
|
|
||||||
define('PHPEXCEL_ROOT', APPLICATION_PATH . '/');
|
define('PHPEXCEL_ROOT', APPLICATION_PATH . '/');
|
||||||
}
|
}
|
||||||
require_once(PHPEXCEL_ROOT . 'PHPExcel/Autoloader.php');
|
require_once(PHPEXCEL_ROOT . 'PHPExcel/Autoloader.php');
|
||||||
@ -52,5 +51,4 @@ class AutoloaderTest extends PHPUnit_Framework_TestCase
|
|||||||
// ... of the correct type
|
// ... of the correct type
|
||||||
$this->assertTrue(is_a($result,'PHPExcel_Calculation_Function'));
|
$this->assertTrue(is_a($result,'PHPExcel_Calculation_Function'));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
|
||||||
|
@ -8,8 +8,7 @@ class DateTimeTest extends PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
public function setUp()
|
public function setUp()
|
||||||
{
|
{
|
||||||
if (!defined('PHPEXCEL_ROOT'))
|
if (!defined('PHPEXCEL_ROOT')) {
|
||||||
{
|
|
||||||
define('PHPEXCEL_ROOT', APPLICATION_PATH . '/');
|
define('PHPEXCEL_ROOT', APPLICATION_PATH . '/');
|
||||||
}
|
}
|
||||||
require_once(PHPEXCEL_ROOT . 'PHPExcel/Autoloader.php');
|
require_once(PHPEXCEL_ROOT . 'PHPExcel/Autoloader.php');
|
||||||
@ -24,7 +23,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);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -77,7 +76,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);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -114,7 +113,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);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -130,7 +129,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);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -146,7 +145,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);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -162,7 +161,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);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -178,7 +177,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);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -194,7 +193,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);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -231,7 +230,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);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -268,7 +267,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);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -284,7 +283,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);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -300,7 +299,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);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -316,7 +315,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);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -332,7 +331,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);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -348,7 +347,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);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -385,7 +384,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);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -422,7 +421,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);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -438,7 +437,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);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -454,7 +453,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);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -462,5 +461,4 @@ class DateTimeTest extends PHPUnit_Framework_TestCase
|
|||||||
{
|
{
|
||||||
return new testDataFileIterator('rawTestData/Calculation/DateTime/YEARFRAC.data');
|
return new testDataFileIterator('rawTestData/Calculation/DateTime/YEARFRAC.data');
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -12,8 +12,7 @@ class EngineeringTest extends PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
public function setUp()
|
public function setUp()
|
||||||
{
|
{
|
||||||
if (!defined('PHPEXCEL_ROOT'))
|
if (!defined('PHPEXCEL_ROOT')) {
|
||||||
{
|
|
||||||
define('PHPEXCEL_ROOT', APPLICATION_PATH . '/');
|
define('PHPEXCEL_ROOT', APPLICATION_PATH . '/');
|
||||||
}
|
}
|
||||||
require_once(PHPEXCEL_ROOT . 'PHPExcel/Autoloader.php');
|
require_once(PHPEXCEL_ROOT . 'PHPExcel/Autoloader.php');
|
||||||
@ -28,7 +27,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);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -44,7 +43,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);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -60,7 +59,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);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -76,7 +75,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);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -92,7 +91,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','COMPLEX'),$args);
|
$result = call_user_func_array(array('PHPExcel_Calculation_Engineering','COMPLEX'), $args);
|
||||||
$this->assertEquals($expectedResult, $result);
|
$this->assertEquals($expectedResult, $result);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -108,7 +107,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);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -124,7 +123,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);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -140,7 +139,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);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -156,7 +155,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);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -172,10 +171,9 @@ 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','IMCONJUGATE'),$args);
|
$result = call_user_func_array(array('PHPExcel_Calculation_Engineering','IMCONJUGATE'), $args);
|
||||||
$complexAssert = new complexAssert();
|
$complexAssert = new complexAssert();
|
||||||
$this->assertTrue($complexAssert->assertComplexEquals($expectedResult, $result, 1E-8),
|
$this->assertTrue($complexAssert->assertComplexEquals($expectedResult, $result, 1E-8), $complexAssert->getErrorMessage());
|
||||||
$complexAssert->getErrorMessage());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function providerIMCONJUGATE()
|
public function providerIMCONJUGATE()
|
||||||
@ -190,10 +188,9 @@ 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','IMCOS'),$args);
|
$result = call_user_func_array(array('PHPExcel_Calculation_Engineering','IMCOS'), $args);
|
||||||
$complexAssert = new complexAssert();
|
$complexAssert = new complexAssert();
|
||||||
$this->assertTrue($complexAssert->assertComplexEquals($expectedResult, $result, 1E-8),
|
$this->assertTrue($complexAssert->assertComplexEquals($expectedResult, $result, 1E-8), $complexAssert->getErrorMessage());
|
||||||
$complexAssert->getErrorMessage());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function providerIMCOS()
|
public function providerIMCOS()
|
||||||
@ -208,10 +205,9 @@ 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','IMDIV'),$args);
|
$result = call_user_func_array(array('PHPExcel_Calculation_Engineering','IMDIV'), $args);
|
||||||
$complexAssert = new complexAssert();
|
$complexAssert = new complexAssert();
|
||||||
$this->assertTrue($complexAssert->assertComplexEquals($expectedResult, $result, 1E-8),
|
$this->assertTrue($complexAssert->assertComplexEquals($expectedResult, $result, 1E-8), $complexAssert->getErrorMessage());
|
||||||
$complexAssert->getErrorMessage());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function providerIMDIV()
|
public function providerIMDIV()
|
||||||
@ -226,10 +222,9 @@ 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','IMEXP'),$args);
|
$result = call_user_func_array(array('PHPExcel_Calculation_Engineering','IMEXP'), $args);
|
||||||
$complexAssert = new complexAssert();
|
$complexAssert = new complexAssert();
|
||||||
$this->assertTrue($complexAssert->assertComplexEquals($expectedResult, $result, 1E-8),
|
$this->assertTrue($complexAssert->assertComplexEquals($expectedResult, $result, 1E-8), $complexAssert->getErrorMessage());
|
||||||
$complexAssert->getErrorMessage());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function providerIMEXP()
|
public function providerIMEXP()
|
||||||
@ -244,10 +239,9 @@ 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','IMLN'),$args);
|
$result = call_user_func_array(array('PHPExcel_Calculation_Engineering','IMLN'), $args);
|
||||||
$complexAssert = new complexAssert();
|
$complexAssert = new complexAssert();
|
||||||
$this->assertTrue($complexAssert->assertComplexEquals($expectedResult, $result, 1E-8),
|
$this->assertTrue($complexAssert->assertComplexEquals($expectedResult, $result, 1E-8), $complexAssert->getErrorMessage());
|
||||||
$complexAssert->getErrorMessage());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function providerIMLN()
|
public function providerIMLN()
|
||||||
@ -262,10 +256,9 @@ 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','IMLOG2'),$args);
|
$result = call_user_func_array(array('PHPExcel_Calculation_Engineering','IMLOG2'), $args);
|
||||||
$complexAssert = new complexAssert();
|
$complexAssert = new complexAssert();
|
||||||
$this->assertTrue($complexAssert->assertComplexEquals($expectedResult, $result, 1E-8),
|
$this->assertTrue($complexAssert->assertComplexEquals($expectedResult, $result, 1E-8), $complexAssert->getErrorMessage());
|
||||||
$complexAssert->getErrorMessage());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function providerIMLOG2()
|
public function providerIMLOG2()
|
||||||
@ -280,10 +273,9 @@ 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','IMLOG10'),$args);
|
$result = call_user_func_array(array('PHPExcel_Calculation_Engineering','IMLOG10'), $args);
|
||||||
$complexAssert = new complexAssert();
|
$complexAssert = new complexAssert();
|
||||||
$this->assertTrue($complexAssert->assertComplexEquals($expectedResult, $result, 1E-8),
|
$this->assertTrue($complexAssert->assertComplexEquals($expectedResult, $result, 1E-8), $complexAssert->getErrorMessage());
|
||||||
$complexAssert->getErrorMessage());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function providerIMLOG10()
|
public function providerIMLOG10()
|
||||||
@ -298,10 +290,9 @@ 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','IMPOWER'),$args);
|
$result = call_user_func_array(array('PHPExcel_Calculation_Engineering','IMPOWER'), $args);
|
||||||
$complexAssert = new complexAssert();
|
$complexAssert = new complexAssert();
|
||||||
$this->assertTrue($complexAssert->assertComplexEquals($expectedResult, $result, 1E-8),
|
$this->assertTrue($complexAssert->assertComplexEquals($expectedResult, $result, 1E-8), $complexAssert->getErrorMessage());
|
||||||
$complexAssert->getErrorMessage());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function providerIMPOWER()
|
public function providerIMPOWER()
|
||||||
@ -316,10 +307,9 @@ 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','IMPRODUCT'),$args);
|
$result = call_user_func_array(array('PHPExcel_Calculation_Engineering','IMPRODUCT'), $args);
|
||||||
$complexAssert = new complexAssert();
|
$complexAssert = new complexAssert();
|
||||||
$this->assertTrue($complexAssert->assertComplexEquals($expectedResult, $result, 1E-8),
|
$this->assertTrue($complexAssert->assertComplexEquals($expectedResult, $result, 1E-8), $complexAssert->getErrorMessage());
|
||||||
$complexAssert->getErrorMessage());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function providerIMPRODUCT()
|
public function providerIMPRODUCT()
|
||||||
@ -334,10 +324,9 @@ 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','IMSIN'),$args);
|
$result = call_user_func_array(array('PHPExcel_Calculation_Engineering','IMSIN'), $args);
|
||||||
$complexAssert = new complexAssert();
|
$complexAssert = new complexAssert();
|
||||||
$this->assertTrue($complexAssert->assertComplexEquals($expectedResult, $result, 1E-8),
|
$this->assertTrue($complexAssert->assertComplexEquals($expectedResult, $result, 1E-8), $complexAssert->getErrorMessage());
|
||||||
$complexAssert->getErrorMessage());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function providerIMSIN()
|
public function providerIMSIN()
|
||||||
@ -352,10 +341,9 @@ 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','IMSQRT'),$args);
|
$result = call_user_func_array(array('PHPExcel_Calculation_Engineering','IMSQRT'), $args);
|
||||||
$complexAssert = new complexAssert();
|
$complexAssert = new complexAssert();
|
||||||
$this->assertTrue($complexAssert->assertComplexEquals($expectedResult, $result, 1E-8),
|
$this->assertTrue($complexAssert->assertComplexEquals($expectedResult, $result, 1E-8), $complexAssert->getErrorMessage());
|
||||||
$complexAssert->getErrorMessage());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function providerIMSQRT()
|
public function providerIMSQRT()
|
||||||
@ -370,10 +358,9 @@ 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','IMSUB'),$args);
|
$result = call_user_func_array(array('PHPExcel_Calculation_Engineering','IMSUB'), $args);
|
||||||
$complexAssert = new complexAssert();
|
$complexAssert = new complexAssert();
|
||||||
$this->assertTrue($complexAssert->assertComplexEquals($expectedResult, $result, 1E-8),
|
$this->assertTrue($complexAssert->assertComplexEquals($expectedResult, $result, 1E-8), $complexAssert->getErrorMessage());
|
||||||
$complexAssert->getErrorMessage());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function providerIMSUB()
|
public function providerIMSUB()
|
||||||
@ -388,10 +375,9 @@ 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','IMSUM'),$args);
|
$result = call_user_func_array(array('PHPExcel_Calculation_Engineering','IMSUM'), $args);
|
||||||
$complexAssert = new complexAssert();
|
$complexAssert = new complexAssert();
|
||||||
$this->assertTrue($complexAssert->assertComplexEquals($expectedResult, $result, 1E-8),
|
$this->assertTrue($complexAssert->assertComplexEquals($expectedResult, $result, 1E-8), $complexAssert->getErrorMessage());
|
||||||
$complexAssert->getErrorMessage());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function providerIMSUM()
|
public function providerIMSUM()
|
||||||
@ -406,7 +392,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);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -422,7 +408,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);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -438,7 +424,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','BINTODEC'),$args);
|
$result = call_user_func_array(array('PHPExcel_Calculation_Engineering','BINTODEC'), $args);
|
||||||
$this->assertEquals($expectedResult, $result);
|
$this->assertEquals($expectedResult, $result);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -454,7 +440,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','BINTOHEX'),$args);
|
$result = call_user_func_array(array('PHPExcel_Calculation_Engineering','BINTOHEX'), $args);
|
||||||
$this->assertEquals($expectedResult, $result);
|
$this->assertEquals($expectedResult, $result);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -470,7 +456,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','BINTOOCT'),$args);
|
$result = call_user_func_array(array('PHPExcel_Calculation_Engineering','BINTOOCT'), $args);
|
||||||
$this->assertEquals($expectedResult, $result);
|
$this->assertEquals($expectedResult, $result);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -486,7 +472,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);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -502,7 +488,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);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -518,7 +504,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);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -534,7 +520,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);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -550,7 +536,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);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -566,7 +552,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);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -582,7 +568,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);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -598,7 +584,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);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -614,7 +600,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);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -630,7 +616,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);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -646,7 +632,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);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -686,7 +672,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);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -694,5 +680,4 @@ class EngineeringTest extends PHPUnit_Framework_TestCase
|
|||||||
{
|
{
|
||||||
return new testDataFileIterator('rawTestData/Calculation/Engineering/CONVERTUOM.data');
|
return new testDataFileIterator('rawTestData/Calculation/Engineering/CONVERTUOM.data');
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -8,8 +8,7 @@ class FinancialTest extends PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
public function setUp()
|
public function setUp()
|
||||||
{
|
{
|
||||||
if (!defined('PHPEXCEL_ROOT'))
|
if (!defined('PHPEXCEL_ROOT')) {
|
||||||
{
|
|
||||||
define('PHPEXCEL_ROOT', APPLICATION_PATH . '/');
|
define('PHPEXCEL_ROOT', APPLICATION_PATH . '/');
|
||||||
}
|
}
|
||||||
require_once(PHPEXCEL_ROOT . 'PHPExcel/Autoloader.php');
|
require_once(PHPEXCEL_ROOT . 'PHPExcel/Autoloader.php');
|
||||||
@ -24,7 +23,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);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -40,7 +39,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);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -56,7 +55,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);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -72,7 +71,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);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -88,7 +87,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);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -104,7 +103,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);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -120,7 +119,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);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -136,7 +135,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);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -152,7 +151,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);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -168,7 +167,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);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -184,7 +183,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);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -200,7 +199,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);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -216,7 +215,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);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -232,7 +231,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);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -248,7 +247,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);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -264,7 +263,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);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -280,7 +279,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);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -296,7 +295,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);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -312,7 +311,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);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -328,7 +327,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);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -344,7 +343,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);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -360,7 +359,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);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -376,7 +375,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);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -392,7 +391,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);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -408,7 +407,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);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -424,7 +423,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);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -440,7 +439,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);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -456,7 +455,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);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -472,7 +471,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);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -488,7 +487,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);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -504,7 +503,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);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -512,5 +511,4 @@ class FinancialTest extends PHPUnit_Framework_TestCase
|
|||||||
{
|
{
|
||||||
return new testDataFileIterator('rawTestData/Calculation/Financial/XIRR.data');
|
return new testDataFileIterator('rawTestData/Calculation/Financial/XIRR.data');
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -8,8 +8,7 @@ class FunctionsTest extends PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
public function setUp()
|
public function setUp()
|
||||||
{
|
{
|
||||||
if (!defined('PHPEXCEL_ROOT'))
|
if (!defined('PHPEXCEL_ROOT')) {
|
||||||
{
|
|
||||||
define('PHPEXCEL_ROOT', APPLICATION_PATH . '/');
|
define('PHPEXCEL_ROOT', APPLICATION_PATH . '/');
|
||||||
}
|
}
|
||||||
require_once(PHPEXCEL_ROOT . 'PHPExcel/Autoloader.php');
|
require_once(PHPEXCEL_ROOT . 'PHPExcel/Autoloader.php');
|
||||||
@ -72,7 +71,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);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -88,7 +87,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);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -104,7 +103,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);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -120,7 +119,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);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -136,7 +135,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);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -152,7 +151,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);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -168,7 +167,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);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -184,7 +183,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);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -200,7 +199,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);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -216,7 +215,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);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -232,7 +231,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);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -248,7 +247,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);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -264,7 +263,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);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -272,5 +271,4 @@ class FunctionsTest extends PHPUnit_Framework_TestCase
|
|||||||
{
|
{
|
||||||
return new testDataFileIterator('rawTestData/Calculation/Functions/N.data');
|
return new testDataFileIterator('rawTestData/Calculation/Functions/N.data');
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -8,8 +8,7 @@ class LogicalTest extends PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
public function setUp()
|
public function setUp()
|
||||||
{
|
{
|
||||||
if (!defined('PHPEXCEL_ROOT'))
|
if (!defined('PHPEXCEL_ROOT')) {
|
||||||
{
|
|
||||||
define('PHPEXCEL_ROOT', APPLICATION_PATH . '/');
|
define('PHPEXCEL_ROOT', APPLICATION_PATH . '/');
|
||||||
}
|
}
|
||||||
require_once(PHPEXCEL_ROOT . 'PHPExcel/Autoloader.php');
|
require_once(PHPEXCEL_ROOT . 'PHPExcel/Autoloader.php');
|
||||||
@ -36,7 +35,7 @@ class LogicalTest 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_Logical','LOGICAL_AND'),$args);
|
$result = call_user_func_array(array('PHPExcel_Calculation_Logical','LOGICAL_AND'), $args);
|
||||||
$this->assertEquals($expectedResult, $result);
|
$this->assertEquals($expectedResult, $result);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -52,7 +51,7 @@ class LogicalTest 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_Logical','LOGICAL_OR'),$args);
|
$result = call_user_func_array(array('PHPExcel_Calculation_Logical','LOGICAL_OR'), $args);
|
||||||
$this->assertEquals($expectedResult, $result);
|
$this->assertEquals($expectedResult, $result);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -68,7 +67,7 @@ class LogicalTest 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_Logical','NOT'),$args);
|
$result = call_user_func_array(array('PHPExcel_Calculation_Logical','NOT'), $args);
|
||||||
$this->assertEquals($expectedResult, $result);
|
$this->assertEquals($expectedResult, $result);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -84,7 +83,7 @@ class LogicalTest 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_Logical','STATEMENT_IF'),$args);
|
$result = call_user_func_array(array('PHPExcel_Calculation_Logical','STATEMENT_IF'), $args);
|
||||||
$this->assertEquals($expectedResult, $result);
|
$this->assertEquals($expectedResult, $result);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -100,7 +99,7 @@ class LogicalTest 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_Logical','IFERROR'),$args);
|
$result = call_user_func_array(array('PHPExcel_Calculation_Logical','IFERROR'), $args);
|
||||||
$this->assertEquals($expectedResult, $result);
|
$this->assertEquals($expectedResult, $result);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -108,5 +107,4 @@ class LogicalTest extends PHPUnit_Framework_TestCase
|
|||||||
{
|
{
|
||||||
return new testDataFileIterator('rawTestData/Calculation/Logical/IFERROR.data');
|
return new testDataFileIterator('rawTestData/Calculation/Logical/IFERROR.data');
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -8,8 +8,7 @@ class LookupRefTest extends PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
public function setUp()
|
public function setUp()
|
||||||
{
|
{
|
||||||
if (!defined('PHPEXCEL_ROOT'))
|
if (!defined('PHPEXCEL_ROOT')) {
|
||||||
{
|
|
||||||
define('PHPEXCEL_ROOT', APPLICATION_PATH . '/');
|
define('PHPEXCEL_ROOT', APPLICATION_PATH . '/');
|
||||||
}
|
}
|
||||||
require_once(PHPEXCEL_ROOT . 'PHPExcel/Autoloader.php');
|
require_once(PHPEXCEL_ROOT . 'PHPExcel/Autoloader.php');
|
||||||
@ -24,7 +23,7 @@ class LookupRefTest 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_LookupRef','HLOOKUP'),$args);
|
$result = call_user_func_array(array('PHPExcel_Calculation_LookupRef','HLOOKUP'), $args);
|
||||||
$this->assertEquals($expectedResult, $result);
|
$this->assertEquals($expectedResult, $result);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -40,7 +39,7 @@ class LookupRefTest 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_LookupRef','VLOOKUP'),$args);
|
$result = call_user_func_array(array('PHPExcel_Calculation_LookupRef','VLOOKUP'), $args);
|
||||||
$this->assertEquals($expectedResult, $result);
|
$this->assertEquals($expectedResult, $result);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -48,5 +47,4 @@ class LookupRefTest extends PHPUnit_Framework_TestCase
|
|||||||
{
|
{
|
||||||
return new testDataFileIterator('rawTestData/Calculation/LookupRef/VLOOKUP.data');
|
return new testDataFileIterator('rawTestData/Calculation/LookupRef/VLOOKUP.data');
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -8,8 +8,7 @@ class MathTrigTest extends PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
public function setUp()
|
public function setUp()
|
||||||
{
|
{
|
||||||
if (!defined('PHPEXCEL_ROOT'))
|
if (!defined('PHPEXCEL_ROOT')) {
|
||||||
{
|
|
||||||
define('PHPEXCEL_ROOT', APPLICATION_PATH . '/');
|
define('PHPEXCEL_ROOT', APPLICATION_PATH . '/');
|
||||||
}
|
}
|
||||||
require_once(PHPEXCEL_ROOT . 'PHPExcel/Autoloader.php');
|
require_once(PHPEXCEL_ROOT . 'PHPExcel/Autoloader.php');
|
||||||
@ -24,7 +23,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);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -40,7 +39,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);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -56,7 +55,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);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -72,7 +71,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);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -88,7 +87,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);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -104,7 +103,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);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -120,7 +119,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);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -136,7 +135,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);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -152,7 +151,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);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -168,7 +167,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);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -184,7 +183,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','INT'),$args);
|
$result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','INT'), $args);
|
||||||
$this->assertEquals($expectedResult, $result);
|
$this->assertEquals($expectedResult, $result);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -200,7 +199,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);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -216,7 +215,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);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -232,7 +231,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);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -248,7 +247,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);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -264,7 +263,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);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -280,7 +279,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);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -296,7 +295,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);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -312,7 +311,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);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -329,7 +328,7 @@ class MathTrigTest extends PHPUnit_Framework_TestCase
|
|||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$expectedResult = array_pop($args);
|
$expectedResult = array_pop($args);
|
||||||
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);
|
||||||
}
|
}
|
||||||
@ -346,7 +345,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);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -362,7 +361,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);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -378,7 +377,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);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -394,7 +393,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);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -410,7 +409,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);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -426,7 +425,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);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -442,7 +441,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);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -458,7 +457,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','ROMAN'),$args);
|
$result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','ROMAN'), $args);
|
||||||
$this->assertEquals($expectedResult, $result);
|
$this->assertEquals($expectedResult, $result);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -474,7 +473,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);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -556,5 +555,4 @@ class MathTrigTest extends PHPUnit_Framework_TestCase
|
|||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -8,8 +8,7 @@ class TextDataTest extends PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
public function setUp()
|
public function setUp()
|
||||||
{
|
{
|
||||||
if (!defined('PHPEXCEL_ROOT'))
|
if (!defined('PHPEXCEL_ROOT')) {
|
||||||
{
|
|
||||||
define('PHPEXCEL_ROOT', APPLICATION_PATH . '/');
|
define('PHPEXCEL_ROOT', APPLICATION_PATH . '/');
|
||||||
}
|
}
|
||||||
require_once(PHPEXCEL_ROOT . 'PHPExcel/Autoloader.php');
|
require_once(PHPEXCEL_ROOT . 'PHPExcel/Autoloader.php');
|
||||||
@ -24,7 +23,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','CHARACTER'),$args);
|
$result = call_user_func_array(array('PHPExcel_Calculation_TextData','CHARACTER'), $args);
|
||||||
$this->assertEquals($expectedResult, $result);
|
$this->assertEquals($expectedResult, $result);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -40,7 +39,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','ASCIICODE'),$args);
|
$result = call_user_func_array(array('PHPExcel_Calculation_TextData','ASCIICODE'), $args);
|
||||||
$this->assertEquals($expectedResult, $result);
|
$this->assertEquals($expectedResult, $result);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -56,7 +55,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','CONCATENATE'),$args);
|
$result = call_user_func_array(array('PHPExcel_Calculation_TextData','CONCATENATE'), $args);
|
||||||
$this->assertEquals($expectedResult, $result);
|
$this->assertEquals($expectedResult, $result);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -72,7 +71,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','LEFT'),$args);
|
$result = call_user_func_array(array('PHPExcel_Calculation_TextData','LEFT'), $args);
|
||||||
$this->assertEquals($expectedResult, $result);
|
$this->assertEquals($expectedResult, $result);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -88,7 +87,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','MID'),$args);
|
$result = call_user_func_array(array('PHPExcel_Calculation_TextData','MID'), $args);
|
||||||
$this->assertEquals($expectedResult, $result);
|
$this->assertEquals($expectedResult, $result);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -104,7 +103,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','RIGHT'),$args);
|
$result = call_user_func_array(array('PHPExcel_Calculation_TextData','RIGHT'), $args);
|
||||||
$this->assertEquals($expectedResult, $result);
|
$this->assertEquals($expectedResult, $result);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -120,7 +119,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','LOWERCASE'),$args);
|
$result = call_user_func_array(array('PHPExcel_Calculation_TextData','LOWERCASE'), $args);
|
||||||
$this->assertEquals($expectedResult, $result);
|
$this->assertEquals($expectedResult, $result);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -136,7 +135,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','UPPERCASE'),$args);
|
$result = call_user_func_array(array('PHPExcel_Calculation_TextData','UPPERCASE'), $args);
|
||||||
$this->assertEquals($expectedResult, $result);
|
$this->assertEquals($expectedResult, $result);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -152,7 +151,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','PROPERCASE'),$args);
|
$result = call_user_func_array(array('PHPExcel_Calculation_TextData','PROPERCASE'), $args);
|
||||||
$this->assertEquals($expectedResult, $result);
|
$this->assertEquals($expectedResult, $result);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -168,7 +167,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','STRINGLENGTH'),$args);
|
$result = call_user_func_array(array('PHPExcel_Calculation_TextData','STRINGLENGTH'), $args);
|
||||||
$this->assertEquals($expectedResult, $result);
|
$this->assertEquals($expectedResult, $result);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -184,7 +183,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','SEARCHINSENSITIVE'),$args);
|
$result = call_user_func_array(array('PHPExcel_Calculation_TextData','SEARCHINSENSITIVE'), $args);
|
||||||
$this->assertEquals($expectedResult, $result);
|
$this->assertEquals($expectedResult, $result);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -200,7 +199,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','SEARCHSENSITIVE'),$args);
|
$result = call_user_func_array(array('PHPExcel_Calculation_TextData','SEARCHSENSITIVE'), $args);
|
||||||
$this->assertEquals($expectedResult, $result);
|
$this->assertEquals($expectedResult, $result);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -216,7 +215,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','REPLACE'),$args);
|
$result = call_user_func_array(array('PHPExcel_Calculation_TextData','REPLACE'), $args);
|
||||||
$this->assertEquals($expectedResult, $result);
|
$this->assertEquals($expectedResult, $result);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -232,7 +231,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','SUBSTITUTE'),$args);
|
$result = call_user_func_array(array('PHPExcel_Calculation_TextData','SUBSTITUTE'), $args);
|
||||||
$this->assertEquals($expectedResult, $result);
|
$this->assertEquals($expectedResult, $result);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -248,7 +247,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','TRIMSPACES'),$args);
|
$result = call_user_func_array(array('PHPExcel_Calculation_TextData','TRIMSPACES'), $args);
|
||||||
$this->assertEquals($expectedResult, $result);
|
$this->assertEquals($expectedResult, $result);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -264,7 +263,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','TRIMNONPRINTABLE'),$args);
|
$result = call_user_func_array(array('PHPExcel_Calculation_TextData','TRIMNONPRINTABLE'), $args);
|
||||||
$this->assertEquals($expectedResult, $result);
|
$this->assertEquals($expectedResult, $result);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -280,7 +279,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','DOLLAR'),$args);
|
$result = call_user_func_array(array('PHPExcel_Calculation_TextData','DOLLAR'), $args);
|
||||||
$this->assertEquals($expectedResult, $result);
|
$this->assertEquals($expectedResult, $result);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -296,7 +295,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','FIXEDFORMAT'),$args);
|
$result = call_user_func_array(array('PHPExcel_Calculation_TextData','FIXEDFORMAT'), $args);
|
||||||
$this->assertEquals($expectedResult, $result);
|
$this->assertEquals($expectedResult, $result);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -312,7 +311,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','RETURNSTRING'),$args);
|
$result = call_user_func_array(array('PHPExcel_Calculation_TextData','RETURNSTRING'), $args);
|
||||||
$this->assertEquals($expectedResult, $result);
|
$this->assertEquals($expectedResult, $result);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -333,7 +332,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','TEXTFORMAT'),$args);
|
$result = call_user_func_array(array('PHPExcel_Calculation_TextData','TEXTFORMAT'), $args);
|
||||||
$this->assertEquals($expectedResult, $result);
|
$this->assertEquals($expectedResult, $result);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -353,7 +352,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);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -361,5 +360,4 @@ class TextDataTest extends PHPUnit_Framework_TestCase
|
|||||||
{
|
{
|
||||||
return new testDataFileIterator('rawTestData/Calculation/TextData/VALUE.data');
|
return new testDataFileIterator('rawTestData/Calculation/TextData/VALUE.data');
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -4,7 +4,6 @@ require_once 'testDataFileIterator.php';
|
|||||||
|
|
||||||
class CalculationTest extends PHPUnit_Framework_TestCase
|
class CalculationTest extends PHPUnit_Framework_TestCase
|
||||||
{
|
{
|
||||||
|
|
||||||
public function setUp()
|
public function setUp()
|
||||||
{
|
{
|
||||||
if (!defined('PHPEXCEL_ROOT')) {
|
if (!defined('PHPEXCEL_ROOT')) {
|
||||||
@ -33,5 +32,4 @@ class CalculationTest extends PHPUnit_Framework_TestCase
|
|||||||
{
|
{
|
||||||
return new testDataFileIterator('rawTestData/CalculationBinaryComparisonOperation.data');
|
return new testDataFileIterator('rawTestData/CalculationBinaryComparisonOperation.data');
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -13,20 +13,20 @@ class AdvancedValueBinderTest extends PHPUnit_Framework_TestCase
|
|||||||
public function provider()
|
public function provider()
|
||||||
{
|
{
|
||||||
if (!class_exists('PHPExcel_Style_NumberFormat')) {
|
if (!class_exists('PHPExcel_Style_NumberFormat')) {
|
||||||
$this->setUp();
|
$this->setUp();
|
||||||
}
|
}
|
||||||
$currencyUSD = PHPExcel_Style_NumberFormat::FORMAT_CURRENCY_USD_SIMPLE;
|
$currencyUSD = PHPExcel_Style_NumberFormat::FORMAT_CURRENCY_USD_SIMPLE;
|
||||||
$currencyEURO = str_replace('$', '€', PHPExcel_Style_NumberFormat::FORMAT_CURRENCY_USD_SIMPLE);
|
$currencyEURO = str_replace('$', '€', PHPExcel_Style_NumberFormat::FORMAT_CURRENCY_USD_SIMPLE);
|
||||||
|
|
||||||
return array(
|
return array(
|
||||||
array('10%', 0.1, PHPExcel_Style_NumberFormat::FORMAT_PERCENTAGE_00, ',', '.', '$'),
|
array('10%', 0.1, PHPExcel_Style_NumberFormat::FORMAT_PERCENTAGE_00, ',', '.', '$'),
|
||||||
array('$10.11', 10.11, $currencyUSD, ',', '.', '$'),
|
array('$10.11', 10.11, $currencyUSD, ',', '.', '$'),
|
||||||
array('$1,010.12', 1010.12, $currencyUSD, ',', '.', '$'),
|
array('$1,010.12', 1010.12, $currencyUSD, ',', '.', '$'),
|
||||||
array('$20,20', 20.2, $currencyUSD, '.', ',', '$'),
|
array('$20,20', 20.2, $currencyUSD, '.', ',', '$'),
|
||||||
array('$2.020,20', 2020.2, $currencyUSD, '.', ',', '$'),
|
array('$2.020,20', 2020.2, $currencyUSD, '.', ',', '$'),
|
||||||
array('€2.020,20', 2020.2, $currencyEURO, '.', ',', '€'),
|
array('€2.020,20', 2020.2, $currencyEURO, '.', ',', '€'),
|
||||||
array('€ 2.020,20', 2020.2, $currencyEURO, '.', ',', '€'),
|
array('€ 2.020,20', 2020.2, $currencyEURO, '.', ',', '€'),
|
||||||
array('€2,020.22', 2020.22, $currencyEURO, ',', '.', '€'),
|
array('€2,020.22', 2020.22, $currencyEURO, ',', '.', '€'),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -70,4 +70,4 @@ class AdvancedValueBinderTest extends PHPUnit_Framework_TestCase
|
|||||||
$binder->bindValue($cell, $value);
|
$binder->bindValue($cell, $value);
|
||||||
$this->assertEquals($valueBinded, $cell->getValue());
|
$this->assertEquals($valueBinded, $cell->getValue());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -6,8 +6,7 @@ class DataTypeTest extends PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
public function setUp()
|
public function setUp()
|
||||||
{
|
{
|
||||||
if (!defined('PHPEXCEL_ROOT'))
|
if (!defined('PHPEXCEL_ROOT')) {
|
||||||
{
|
|
||||||
define('PHPEXCEL_ROOT', APPLICATION_PATH . '/');
|
define('PHPEXCEL_ROOT', APPLICATION_PATH . '/');
|
||||||
}
|
}
|
||||||
require_once(PHPEXCEL_ROOT . 'PHPExcel/Autoloader.php');
|
require_once(PHPEXCEL_ROOT . 'PHPExcel/Autoloader.php');
|
||||||
@ -20,5 +19,4 @@ class DataTypeTest extends PHPUnit_Framework_TestCase
|
|||||||
$this->assertGreaterThan(0, count($result));
|
$this->assertGreaterThan(0, count($result));
|
||||||
$this->assertArrayHasKey('#NULL!', $result);
|
$this->assertArrayHasKey('#NULL!', $result);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -8,8 +8,7 @@ class DefaultValueBinderTest extends PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
public function setUp()
|
public function setUp()
|
||||||
{
|
{
|
||||||
if (!defined('PHPEXCEL_ROOT'))
|
if (!defined('PHPEXCEL_ROOT')) {
|
||||||
{
|
|
||||||
define('PHPEXCEL_ROOT', APPLICATION_PATH . '/');
|
define('PHPEXCEL_ROOT', APPLICATION_PATH . '/');
|
||||||
}
|
}
|
||||||
require_once(PHPEXCEL_ROOT . 'PHPExcel/Autoloader.php');
|
require_once(PHPEXCEL_ROOT . 'PHPExcel/Autoloader.php');
|
||||||
|
@ -6,8 +6,7 @@ class HyperlinkTest extends PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
public function setUp()
|
public function setUp()
|
||||||
{
|
{
|
||||||
if (!defined('PHPEXCEL_ROOT'))
|
if (!defined('PHPEXCEL_ROOT')) {
|
||||||
{
|
|
||||||
define('PHPEXCEL_ROOT', APPLICATION_PATH . '/');
|
define('PHPEXCEL_ROOT', APPLICATION_PATH . '/');
|
||||||
}
|
}
|
||||||
require_once(PHPEXCEL_ROOT . 'PHPExcel/Autoloader.php');
|
require_once(PHPEXCEL_ROOT . 'PHPExcel/Autoloader.php');
|
||||||
@ -20,7 +19,7 @@ class HyperlinkTest extends PHPUnit_Framework_TestCase
|
|||||||
$testInstance = new PHPExcel_Cell_Hyperlink($urlValue);
|
$testInstance = new PHPExcel_Cell_Hyperlink($urlValue);
|
||||||
|
|
||||||
$result = $testInstance->getUrl();
|
$result = $testInstance->getUrl();
|
||||||
$this->assertEquals($urlValue,$result);
|
$this->assertEquals($urlValue, $result);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testSetUrl()
|
public function testSetUrl()
|
||||||
@ -33,7 +32,7 @@ class HyperlinkTest extends PHPUnit_Framework_TestCase
|
|||||||
$this->assertTrue($result instanceof PHPExcel_Cell_Hyperlink);
|
$this->assertTrue($result instanceof PHPExcel_Cell_Hyperlink);
|
||||||
|
|
||||||
$result = $testInstance->getUrl();
|
$result = $testInstance->getUrl();
|
||||||
$this->assertEquals($newUrlValue,$result);
|
$this->assertEquals($newUrlValue, $result);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testGetTooltip()
|
public function testGetTooltip()
|
||||||
@ -43,7 +42,7 @@ class HyperlinkTest extends PHPUnit_Framework_TestCase
|
|||||||
$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);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testSetTooltip()
|
public function testSetTooltip()
|
||||||
@ -56,7 +55,7 @@ class HyperlinkTest extends PHPUnit_Framework_TestCase
|
|||||||
$this->assertTrue($result instanceof PHPExcel_Cell_Hyperlink);
|
$this->assertTrue($result instanceof PHPExcel_Cell_Hyperlink);
|
||||||
|
|
||||||
$result = $testInstance->getTooltip();
|
$result = $testInstance->getTooltip();
|
||||||
$this->assertEquals($newTooltipValue,$result);
|
$this->assertEquals($newTooltipValue, $result);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testIsInternal()
|
public function testIsInternal()
|
||||||
@ -82,7 +81,6 @@ class HyperlinkTest extends PHPUnit_Framework_TestCase
|
|||||||
$testInstance = new PHPExcel_Cell_Hyperlink($urlValue, $tooltipValue);
|
$testInstance = new PHPExcel_Cell_Hyperlink($urlValue, $tooltipValue);
|
||||||
|
|
||||||
$result = $testInstance->getHashCode();
|
$result = $testInstance->getHashCode();
|
||||||
$this->assertEquals($initialExpectedHash,$result);
|
$this->assertEquals($initialExpectedHash, $result);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -21,7 +21,7 @@ class CellTest 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_Cell','columnIndexFromString'),$args);
|
$result = call_user_func_array(array('PHPExcel_Cell','columnIndexFromString'), $args);
|
||||||
$this->assertEquals($expectedResult, $result);
|
$this->assertEquals($expectedResult, $result);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -34,7 +34,7 @@ class CellTest extends PHPUnit_Framework_TestCase
|
|||||||
{
|
{
|
||||||
$cellAddress = 'ABCD';
|
$cellAddress = 'ABCD';
|
||||||
try {
|
try {
|
||||||
$result = call_user_func(array('PHPExcel_Cell','columnIndexFromString'),$cellAddress);
|
$result = call_user_func(array('PHPExcel_Cell','columnIndexFromString'), $cellAddress);
|
||||||
} catch (PHPExcel_Exception $e) {
|
} catch (PHPExcel_Exception $e) {
|
||||||
$this->assertEquals($e->getMessage(), 'Column string index can not be longer than 3 characters');
|
$this->assertEquals($e->getMessage(), 'Column string index can not be longer than 3 characters');
|
||||||
return;
|
return;
|
||||||
@ -46,7 +46,7 @@ class CellTest extends PHPUnit_Framework_TestCase
|
|||||||
{
|
{
|
||||||
$cellAddress = '';
|
$cellAddress = '';
|
||||||
try {
|
try {
|
||||||
$result = call_user_func(array('PHPExcel_Cell','columnIndexFromString'),$cellAddress);
|
$result = call_user_func(array('PHPExcel_Cell','columnIndexFromString'), $cellAddress);
|
||||||
} catch (PHPExcel_Exception $e) {
|
} catch (PHPExcel_Exception $e) {
|
||||||
$this->assertEquals($e->getMessage(), 'Column string index can not be empty');
|
$this->assertEquals($e->getMessage(), 'Column string index can not be empty');
|
||||||
return;
|
return;
|
||||||
@ -61,7 +61,7 @@ class CellTest 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_Cell','stringFromColumnIndex'),$args);
|
$result = call_user_func_array(array('PHPExcel_Cell','stringFromColumnIndex'), $args);
|
||||||
$this->assertEquals($expectedResult, $result);
|
$this->assertEquals($expectedResult, $result);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -77,7 +77,7 @@ class CellTest 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_Cell','coordinateFromString'),$args);
|
$result = call_user_func_array(array('PHPExcel_Cell','coordinateFromString'), $args);
|
||||||
$this->assertEquals($expectedResult, $result);
|
$this->assertEquals($expectedResult, $result);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -90,7 +90,7 @@ class CellTest extends PHPUnit_Framework_TestCase
|
|||||||
{
|
{
|
||||||
$cellAddress = 'A1:AI2012';
|
$cellAddress = 'A1:AI2012';
|
||||||
try {
|
try {
|
||||||
$result = call_user_func(array('PHPExcel_Cell','coordinateFromString'),$cellAddress);
|
$result = call_user_func(array('PHPExcel_Cell','coordinateFromString'), $cellAddress);
|
||||||
} catch (PHPExcel_Exception $e) {
|
} catch (PHPExcel_Exception $e) {
|
||||||
$this->assertEquals($e->getMessage(), 'Cell coordinate string can not be a range of cells');
|
$this->assertEquals($e->getMessage(), 'Cell coordinate string can not be a range of cells');
|
||||||
return;
|
return;
|
||||||
@ -102,7 +102,7 @@ class CellTest extends PHPUnit_Framework_TestCase
|
|||||||
{
|
{
|
||||||
$cellAddress = '';
|
$cellAddress = '';
|
||||||
try {
|
try {
|
||||||
$result = call_user_func(array('PHPExcel_Cell','coordinateFromString'),$cellAddress);
|
$result = call_user_func(array('PHPExcel_Cell','coordinateFromString'), $cellAddress);
|
||||||
} catch (PHPExcel_Exception $e) {
|
} catch (PHPExcel_Exception $e) {
|
||||||
$this->assertEquals($e->getMessage(), 'Cell coordinate can not be zero-length string');
|
$this->assertEquals($e->getMessage(), 'Cell coordinate can not be zero-length string');
|
||||||
return;
|
return;
|
||||||
@ -114,7 +114,7 @@ class CellTest extends PHPUnit_Framework_TestCase
|
|||||||
{
|
{
|
||||||
$cellAddress = 'AI';
|
$cellAddress = 'AI';
|
||||||
try {
|
try {
|
||||||
$result = call_user_func(array('PHPExcel_Cell','coordinateFromString'),$cellAddress);
|
$result = call_user_func(array('PHPExcel_Cell','coordinateFromString'), $cellAddress);
|
||||||
} catch (PHPExcel_Exception $e) {
|
} catch (PHPExcel_Exception $e) {
|
||||||
$this->assertEquals($e->getMessage(), 'Invalid cell coordinate '.$cellAddress);
|
$this->assertEquals($e->getMessage(), 'Invalid cell coordinate '.$cellAddress);
|
||||||
return;
|
return;
|
||||||
@ -129,7 +129,7 @@ class CellTest 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_Cell','absoluteCoordinate'),$args);
|
$result = call_user_func_array(array('PHPExcel_Cell','absoluteCoordinate'), $args);
|
||||||
$this->assertEquals($expectedResult, $result);
|
$this->assertEquals($expectedResult, $result);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -142,7 +142,7 @@ class CellTest extends PHPUnit_Framework_TestCase
|
|||||||
{
|
{
|
||||||
$cellAddress = 'A1:AI2012';
|
$cellAddress = 'A1:AI2012';
|
||||||
try {
|
try {
|
||||||
$result = call_user_func(array('PHPExcel_Cell','absoluteCoordinate'),$cellAddress);
|
$result = call_user_func(array('PHPExcel_Cell','absoluteCoordinate'), $cellAddress);
|
||||||
} catch (PHPExcel_Exception $e) {
|
} catch (PHPExcel_Exception $e) {
|
||||||
$this->assertEquals($e->getMessage(), 'Cell coordinate string can not be a range of cells');
|
$this->assertEquals($e->getMessage(), 'Cell coordinate string can not be a range of cells');
|
||||||
return;
|
return;
|
||||||
@ -157,7 +157,7 @@ class CellTest 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_Cell','absoluteReference'),$args);
|
$result = call_user_func_array(array('PHPExcel_Cell','absoluteReference'), $args);
|
||||||
$this->assertEquals($expectedResult, $result);
|
$this->assertEquals($expectedResult, $result);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -170,7 +170,7 @@ class CellTest extends PHPUnit_Framework_TestCase
|
|||||||
{
|
{
|
||||||
$cellAddress = 'A1:AI2012';
|
$cellAddress = 'A1:AI2012';
|
||||||
try {
|
try {
|
||||||
$result = call_user_func(array('PHPExcel_Cell','absoluteReference'),$cellAddress);
|
$result = call_user_func(array('PHPExcel_Cell','absoluteReference'), $cellAddress);
|
||||||
} catch (PHPExcel_Exception $e) {
|
} catch (PHPExcel_Exception $e) {
|
||||||
$this->assertEquals($e->getMessage(), 'Cell coordinate string can not be a range of cells');
|
$this->assertEquals($e->getMessage(), 'Cell coordinate string can not be a range of cells');
|
||||||
return;
|
return;
|
||||||
@ -185,7 +185,7 @@ class CellTest 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_Cell','splitRange'),$args);
|
$result = call_user_func_array(array('PHPExcel_Cell','splitRange'), $args);
|
||||||
foreach ($result as $key => $split) {
|
foreach ($result as $key => $split) {
|
||||||
if (!is_array($expectedResult[$key])) {
|
if (!is_array($expectedResult[$key])) {
|
||||||
$this->assertEquals($expectedResult[$key], $split[0]);
|
$this->assertEquals($expectedResult[$key], $split[0]);
|
||||||
@ -207,7 +207,7 @@ class CellTest 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_Cell','buildRange'),$args);
|
$result = call_user_func_array(array('PHPExcel_Cell','buildRange'), $args);
|
||||||
$this->assertEquals($expectedResult, $result);
|
$this->assertEquals($expectedResult, $result);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -220,7 +220,7 @@ class CellTest extends PHPUnit_Framework_TestCase
|
|||||||
{
|
{
|
||||||
$cellRange = '';
|
$cellRange = '';
|
||||||
try {
|
try {
|
||||||
$result = call_user_func(array('PHPExcel_Cell','buildRange'),$cellRange);
|
$result = call_user_func(array('PHPExcel_Cell','buildRange'), $cellRange);
|
||||||
} catch (PHPExcel_Exception $e) {
|
} catch (PHPExcel_Exception $e) {
|
||||||
$this->assertEquals($e->getMessage(), 'Range does not contain any information');
|
$this->assertEquals($e->getMessage(), 'Range does not contain any information');
|
||||||
return;
|
return;
|
||||||
@ -235,7 +235,7 @@ class CellTest 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_Cell','rangeBoundaries'),$args);
|
$result = call_user_func_array(array('PHPExcel_Cell','rangeBoundaries'), $args);
|
||||||
$this->assertEquals($expectedResult, $result);
|
$this->assertEquals($expectedResult, $result);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -251,7 +251,7 @@ class CellTest 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_Cell','rangeDimension'),$args);
|
$result = call_user_func_array(array('PHPExcel_Cell','rangeDimension'), $args);
|
||||||
$this->assertEquals($expectedResult, $result);
|
$this->assertEquals($expectedResult, $result);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -267,7 +267,7 @@ class CellTest 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_Cell','getRangeBoundaries'),$args);
|
$result = call_user_func_array(array('PHPExcel_Cell','getRangeBoundaries'), $args);
|
||||||
$this->assertEquals($expectedResult, $result);
|
$this->assertEquals($expectedResult, $result);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -283,7 +283,7 @@ class CellTest 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_Cell','extractAllCellReferencesInRange'),$args);
|
$result = call_user_func_array(array('PHPExcel_Cell','extractAllCellReferencesInRange'), $args);
|
||||||
$this->assertEquals($expectedResult, $result);
|
$this->assertEquals($expectedResult, $result);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -291,5 +291,4 @@ class CellTest extends PHPUnit_Framework_TestCase
|
|||||||
{
|
{
|
||||||
return new testDataFileIterator('rawTestData/CellExtractAllCellReferencesInRange.data');
|
return new testDataFileIterator('rawTestData/CellExtractAllCellReferencesInRange.data');
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -6,8 +6,7 @@ class DataSeriesValuesTest extends PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
public function setUp()
|
public function setUp()
|
||||||
{
|
{
|
||||||
if (!defined('PHPEXCEL_ROOT'))
|
if (!defined('PHPEXCEL_ROOT')) {
|
||||||
{
|
|
||||||
define('PHPEXCEL_ROOT', APPLICATION_PATH . '/');
|
define('PHPEXCEL_ROOT', APPLICATION_PATH . '/');
|
||||||
}
|
}
|
||||||
require_once(PHPEXCEL_ROOT . 'PHPExcel/Autoloader.php');
|
require_once(PHPEXCEL_ROOT . 'PHPExcel/Autoloader.php');
|
||||||
@ -49,7 +48,6 @@ class DataSeriesValuesTest extends PHPUnit_Framework_TestCase
|
|||||||
$setValue = $testInstance->setDataType($dataTypeValue);
|
$setValue = $testInstance->setDataType($dataTypeValue);
|
||||||
|
|
||||||
$result = $testInstance->getDataType();
|
$result = $testInstance->getDataType();
|
||||||
$this->assertEquals($dataTypeValue,$result);
|
$this->assertEquals($dataTypeValue, $result);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -6,8 +6,7 @@ class LayoutTest extends PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
public function setUp()
|
public function setUp()
|
||||||
{
|
{
|
||||||
if (!defined('PHPEXCEL_ROOT'))
|
if (!defined('PHPEXCEL_ROOT')) {
|
||||||
{
|
|
||||||
define('PHPEXCEL_ROOT', APPLICATION_PATH . '/');
|
define('PHPEXCEL_ROOT', APPLICATION_PATH . '/');
|
||||||
}
|
}
|
||||||
require_once(PHPEXCEL_ROOT . 'PHPExcel/Autoloader.php');
|
require_once(PHPEXCEL_ROOT . 'PHPExcel/Autoloader.php');
|
||||||
@ -31,7 +30,6 @@ class LayoutTest extends PHPUnit_Framework_TestCase
|
|||||||
$setValue = $testInstance->setLayoutTarget($LayoutTargetValue);
|
$setValue = $testInstance->setLayoutTarget($LayoutTargetValue);
|
||||||
|
|
||||||
$result = $testInstance->getLayoutTarget();
|
$result = $testInstance->getLayoutTarget();
|
||||||
$this->assertEquals($LayoutTargetValue,$result);
|
$this->assertEquals($LayoutTargetValue, $result);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -6,8 +6,7 @@ class LegendTest extends PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
public function setUp()
|
public function setUp()
|
||||||
{
|
{
|
||||||
if (!defined('PHPEXCEL_ROOT'))
|
if (!defined('PHPEXCEL_ROOT')) {
|
||||||
{
|
|
||||||
define('PHPEXCEL_ROOT', APPLICATION_PATH . '/');
|
define('PHPEXCEL_ROOT', APPLICATION_PATH . '/');
|
||||||
}
|
}
|
||||||
require_once(PHPEXCEL_ROOT . 'PHPExcel/Autoloader.php');
|
require_once(PHPEXCEL_ROOT . 'PHPExcel/Autoloader.php');
|
||||||
@ -39,7 +38,7 @@ class LegendTest extends PHPUnit_Framework_TestCase
|
|||||||
$this->assertFalse($result);
|
$this->assertFalse($result);
|
||||||
// Ensure that value is unchanged
|
// Ensure that value is unchanged
|
||||||
$result = $testInstance->getPosition();
|
$result = $testInstance->getPosition();
|
||||||
$this->assertEquals(PHPExcel_Chart_Legend::POSITION_RIGHT,$result);
|
$this->assertEquals(PHPExcel_Chart_Legend::POSITION_RIGHT, $result);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testGetPosition()
|
public function testGetPosition()
|
||||||
@ -50,7 +49,7 @@ class LegendTest extends PHPUnit_Framework_TestCase
|
|||||||
$setValue = $testInstance->setPosition($PositionValue);
|
$setValue = $testInstance->setPosition($PositionValue);
|
||||||
|
|
||||||
$result = $testInstance->getPosition();
|
$result = $testInstance->getPosition();
|
||||||
$this->assertEquals($PositionValue,$result);
|
$this->assertEquals($PositionValue, $result);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testSetPositionXL()
|
public function testSetPositionXL()
|
||||||
@ -80,7 +79,7 @@ class LegendTest extends PHPUnit_Framework_TestCase
|
|||||||
$this->assertFalse($result);
|
$this->assertFalse($result);
|
||||||
// Ensure that value is unchanged
|
// Ensure that value is unchanged
|
||||||
$result = $testInstance->getPositionXL();
|
$result = $testInstance->getPositionXL();
|
||||||
$this->assertEquals(PHPExcel_Chart_Legend::xlLegendPositionRight,$result);
|
$this->assertEquals(PHPExcel_Chart_Legend::xlLegendPositionRight, $result);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testGetPositionXL()
|
public function testGetPositionXL()
|
||||||
@ -91,7 +90,7 @@ class LegendTest extends PHPUnit_Framework_TestCase
|
|||||||
$setValue = $testInstance->setPositionXL($PositionValue);
|
$setValue = $testInstance->setPositionXL($PositionValue);
|
||||||
|
|
||||||
$result = $testInstance->getPositionXL();
|
$result = $testInstance->getPositionXL();
|
||||||
$this->assertEquals($PositionValue,$result);
|
$this->assertEquals($PositionValue, $result);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testSetOverlay()
|
public function testSetOverlay()
|
||||||
@ -128,7 +127,7 @@ class LegendTest extends PHPUnit_Framework_TestCase
|
|||||||
$setValue = $testInstance->setOverlay($OverlayValue);
|
$setValue = $testInstance->setOverlay($OverlayValue);
|
||||||
|
|
||||||
$result = $testInstance->getOverlay();
|
$result = $testInstance->getOverlay();
|
||||||
$this->assertEquals($OverlayValue,$result);
|
$this->assertEquals($OverlayValue, $result);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -51,5 +51,4 @@ class XEEValidatorTest extends PHPUnit_Framework_TestCase
|
|||||||
}
|
}
|
||||||
return $tests;
|
return $tests;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -54,5 +54,4 @@ class ReferenceHelperTest extends PHPUnit_Framework_TestCase
|
|||||||
$this->assertEquals($columnExpectedResult[$key], $value);
|
$this->assertEquals($columnExpectedResult[$key], $value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -21,7 +21,7 @@ class CodePageTest 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_CodePage','NumberToName'),$args);
|
$result = call_user_func_array(array('PHPExcel_Shared_CodePage','NumberToName'), $args);
|
||||||
$this->assertEquals($expectedResult, $result);
|
$this->assertEquals($expectedResult, $result);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -34,7 +34,7 @@ class CodePageTest extends PHPUnit_Framework_TestCase
|
|||||||
{
|
{
|
||||||
$invalidCodePage = 12345;
|
$invalidCodePage = 12345;
|
||||||
try {
|
try {
|
||||||
$result = call_user_func(array('PHPExcel_Shared_CodePage','NumberToName'),$invalidCodePage);
|
$result = call_user_func(array('PHPExcel_Shared_CodePage','NumberToName'), $invalidCodePage);
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
$this->assertEquals($e->getMessage(), 'Unknown codepage: 12345');
|
$this->assertEquals($e->getMessage(), 'Unknown codepage: 12345');
|
||||||
return;
|
return;
|
||||||
@ -46,12 +46,11 @@ class CodePageTest extends PHPUnit_Framework_TestCase
|
|||||||
{
|
{
|
||||||
$unsupportedCodePage = 720;
|
$unsupportedCodePage = 720;
|
||||||
try {
|
try {
|
||||||
$result = call_user_func(array('PHPExcel_Shared_CodePage','NumberToName'),$unsupportedCodePage);
|
$result = call_user_func(array('PHPExcel_Shared_CodePage','NumberToName'), $unsupportedCodePage);
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
$this->assertEquals($e->getMessage(), 'Code page 720 not supported.');
|
$this->assertEquals($e->getMessage(), 'Code page 720 not supported.');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$this->fail('An expected exception has not been raised.');
|
$this->fail('An expected exception has not been raised.');
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -22,7 +22,7 @@ class DateTest extends PHPUnit_Framework_TestCase
|
|||||||
);
|
);
|
||||||
|
|
||||||
foreach ($calendarValues as $calendarValue) {
|
foreach ($calendarValues as $calendarValue) {
|
||||||
$result = call_user_func(array('PHPExcel_Shared_Date','setExcelCalendar'),$calendarValue);
|
$result = call_user_func(array('PHPExcel_Shared_Date','setExcelCalendar'), $calendarValue);
|
||||||
$this->assertTrue($result);
|
$this->assertTrue($result);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -30,7 +30,7 @@ class DateTest extends PHPUnit_Framework_TestCase
|
|||||||
public function testSetExcelCalendarWithInvalidValue()
|
public function testSetExcelCalendarWithInvalidValue()
|
||||||
{
|
{
|
||||||
$unsupportedCalendar = '2012';
|
$unsupportedCalendar = '2012';
|
||||||
$result = call_user_func(array('PHPExcel_Shared_Date','setExcelCalendar'),$unsupportedCalendar);
|
$result = call_user_func(array('PHPExcel_Shared_Date','setExcelCalendar'), $unsupportedCalendar);
|
||||||
$this->assertFalse($result);
|
$this->assertFalse($result);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -49,7 +49,7 @@ class DateTest extends PHPUnit_Framework_TestCase
|
|||||||
if ($args[0] < 1) {
|
if ($args[0] < 1) {
|
||||||
$expectedResult += gmmktime(0,0,0);
|
$expectedResult += gmmktime(0,0,0);
|
||||||
}
|
}
|
||||||
$result = call_user_func_array(array('PHPExcel_Shared_Date','ExcelToPHP'),$args);
|
$result = call_user_func_array(array('PHPExcel_Shared_Date','ExcelToPHP'), $args);
|
||||||
$this->assertEquals($expectedResult, $result);
|
$this->assertEquals($expectedResult, $result);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -70,7 +70,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);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -91,7 +91,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);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -115,7 +115,7 @@ class DateTest extends PHPUnit_Framework_TestCase
|
|||||||
if ($args[0] < 1) {
|
if ($args[0] < 1) {
|
||||||
$expectedResult += gmmktime(0,0,0);
|
$expectedResult += gmmktime(0,0,0);
|
||||||
}
|
}
|
||||||
$result = call_user_func_array(array('PHPExcel_Shared_Date','ExcelToPHP'),$args);
|
$result = call_user_func_array(array('PHPExcel_Shared_Date','ExcelToPHP'), $args);
|
||||||
$this->assertEquals($expectedResult, $result);
|
$this->assertEquals($expectedResult, $result);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -136,7 +136,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);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -152,7 +152,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','isDateTimeFormatCode'),$args);
|
$result = call_user_func_array(array('PHPExcel_Shared_Date','isDateTimeFormatCode'), $args);
|
||||||
$this->assertEquals($expectedResult, $result);
|
$this->assertEquals($expectedResult, $result);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -176,7 +176,7 @@ class DateTest extends PHPUnit_Framework_TestCase
|
|||||||
if ($args[0] < 1) {
|
if ($args[0] < 1) {
|
||||||
$expectedResult += gmmktime(0,0,0);
|
$expectedResult += gmmktime(0,0,0);
|
||||||
}
|
}
|
||||||
$result = call_user_func_array(array('PHPExcel_Shared_Date','ExcelToPHP'),$args);
|
$result = call_user_func_array(array('PHPExcel_Shared_Date','ExcelToPHP'), $args);
|
||||||
$this->assertEquals($expectedResult, $result);
|
$this->assertEquals($expectedResult, $result);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -184,5 +184,4 @@ class DateTest extends PHPUnit_Framework_TestCase
|
|||||||
{
|
{
|
||||||
return new testDataFileIterator('rawTestData/Shared/DateTimeExcelToPHP1900Timezone.data');
|
return new testDataFileIterator('rawTestData/Shared/DateTimeExcelToPHP1900Timezone.data');
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -16,7 +16,7 @@ class FileTest extends PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
public function testGetUseUploadTempDirectory()
|
public function testGetUseUploadTempDirectory()
|
||||||
{
|
{
|
||||||
$expectedResult = FALSE;
|
$expectedResult = false;
|
||||||
|
|
||||||
$result = call_user_func(array('PHPExcel_Shared_File','getUseUploadTempDirectory'));
|
$result = call_user_func(array('PHPExcel_Shared_File','getUseUploadTempDirectory'));
|
||||||
$this->assertEquals($expectedResult, $result);
|
$this->assertEquals($expectedResult, $result);
|
||||||
@ -30,7 +30,7 @@ class FileTest extends PHPUnit_Framework_TestCase
|
|||||||
);
|
);
|
||||||
|
|
||||||
foreach ($useUploadTempDirectoryValues as $useUploadTempDirectoryValue) {
|
foreach ($useUploadTempDirectoryValues as $useUploadTempDirectoryValue) {
|
||||||
call_user_func(array('PHPExcel_Shared_File','setUseUploadTempDirectory'),$useUploadTempDirectoryValue);
|
call_user_func(array('PHPExcel_Shared_File','setUseUploadTempDirectory'), $useUploadTempDirectoryValue);
|
||||||
|
|
||||||
$result = call_user_func(array('PHPExcel_Shared_File','getUseUploadTempDirectory'));
|
$result = call_user_func(array('PHPExcel_Shared_File','getUseUploadTempDirectory'));
|
||||||
$this->assertEquals($useUploadTempDirectoryValue, $result);
|
$this->assertEquals($useUploadTempDirectoryValue, $result);
|
||||||
|
@ -30,7 +30,7 @@ class FontTest extends PHPUnit_Framework_TestCase
|
|||||||
);
|
);
|
||||||
|
|
||||||
foreach ($autosizeMethodValues as $autosizeMethodValue) {
|
foreach ($autosizeMethodValues as $autosizeMethodValue) {
|
||||||
$result = call_user_func(array('PHPExcel_Shared_Font','setAutoSizeMethod'),$autosizeMethodValue);
|
$result = call_user_func(array('PHPExcel_Shared_Font','setAutoSizeMethod'), $autosizeMethodValue);
|
||||||
$this->assertTrue($result);
|
$this->assertTrue($result);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -39,7 +39,7 @@ class FontTest extends PHPUnit_Framework_TestCase
|
|||||||
{
|
{
|
||||||
$unsupportedAutosizeMethod = 'guess';
|
$unsupportedAutosizeMethod = 'guess';
|
||||||
|
|
||||||
$result = call_user_func(array('PHPExcel_Shared_Font','setAutoSizeMethod'),$unsupportedAutosizeMethod);
|
$result = call_user_func(array('PHPExcel_Shared_Font','setAutoSizeMethod'), $unsupportedAutosizeMethod);
|
||||||
$this->assertFalse($result);
|
$this->assertFalse($result);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -50,7 +50,7 @@ class FontTest 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_Font','fontSizeToPixels'),$args);
|
$result = call_user_func_array(array('PHPExcel_Shared_Font','fontSizeToPixels'), $args);
|
||||||
$this->assertEquals($expectedResult, $result);
|
$this->assertEquals($expectedResult, $result);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -66,7 +66,7 @@ class FontTest 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_Font','inchSizeToPixels'),$args);
|
$result = call_user_func_array(array('PHPExcel_Shared_Font','inchSizeToPixels'), $args);
|
||||||
$this->assertEquals($expectedResult, $result);
|
$this->assertEquals($expectedResult, $result);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -82,7 +82,7 @@ class FontTest 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_Font','centimeterSizeToPixels'),$args);
|
$result = call_user_func_array(array('PHPExcel_Shared_Font','centimeterSizeToPixels'), $args);
|
||||||
$this->assertEquals($expectedResult, $result);
|
$this->assertEquals($expectedResult, $result);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -90,5 +90,4 @@ class FontTest extends PHPUnit_Framework_TestCase
|
|||||||
{
|
{
|
||||||
return new testDataFileIterator('rawTestData/Shared/CentimeterSizeToPixels.data');
|
return new testDataFileIterator('rawTestData/Shared/CentimeterSizeToPixels.data');
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -21,7 +21,7 @@ class PasswordHasherTest 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_PasswordHasher','hashPassword'),$args);
|
$result = call_user_func_array(array('PHPExcel_Shared_PasswordHasher','hashPassword'), $args);
|
||||||
$this->assertEquals($expectedResult, $result);
|
$this->assertEquals($expectedResult, $result);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -29,5 +29,4 @@ class PasswordHasherTest extends PHPUnit_Framework_TestCase
|
|||||||
{
|
{
|
||||||
return new testDataFileIterator('rawTestData/Shared/PasswordHashes.data');
|
return new testDataFileIterator('rawTestData/Shared/PasswordHashes.data');
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -38,7 +38,7 @@ class StringTest extends PHPUnit_Framework_TestCase
|
|||||||
public function testSetDecimalSeparator()
|
public function testSetDecimalSeparator()
|
||||||
{
|
{
|
||||||
$expectedResult = ',';
|
$expectedResult = ',';
|
||||||
$result = call_user_func(array('PHPExcel_Shared_String','setDecimalSeparator'),$expectedResult);
|
$result = call_user_func(array('PHPExcel_Shared_String','setDecimalSeparator'), $expectedResult);
|
||||||
|
|
||||||
$result = call_user_func(array('PHPExcel_Shared_String','getDecimalSeparator'));
|
$result = call_user_func(array('PHPExcel_Shared_String','getDecimalSeparator'));
|
||||||
$this->assertEquals($expectedResult, $result);
|
$this->assertEquals($expectedResult, $result);
|
||||||
@ -56,7 +56,7 @@ class StringTest extends PHPUnit_Framework_TestCase
|
|||||||
public function testSetThousandsSeparator()
|
public function testSetThousandsSeparator()
|
||||||
{
|
{
|
||||||
$expectedResult = ' ';
|
$expectedResult = ' ';
|
||||||
$result = call_user_func(array('PHPExcel_Shared_String','setThousandsSeparator'),$expectedResult);
|
$result = call_user_func(array('PHPExcel_Shared_String','setThousandsSeparator'), $expectedResult);
|
||||||
|
|
||||||
$result = call_user_func(array('PHPExcel_Shared_String','getThousandsSeparator'));
|
$result = call_user_func(array('PHPExcel_Shared_String','getThousandsSeparator'));
|
||||||
$this->assertEquals($expectedResult, $result);
|
$this->assertEquals($expectedResult, $result);
|
||||||
@ -74,10 +74,9 @@ class StringTest extends PHPUnit_Framework_TestCase
|
|||||||
public function testSetCurrencyCode()
|
public function testSetCurrencyCode()
|
||||||
{
|
{
|
||||||
$expectedResult = '£';
|
$expectedResult = '£';
|
||||||
$result = call_user_func(array('PHPExcel_Shared_String','setCurrencyCode'),$expectedResult);
|
$result = call_user_func(array('PHPExcel_Shared_String','setCurrencyCode'), $expectedResult);
|
||||||
|
|
||||||
$result = call_user_func(array('PHPExcel_Shared_String','getCurrencyCode'));
|
$result = call_user_func(array('PHPExcel_Shared_String','getCurrencyCode'));
|
||||||
$this->assertEquals($expectedResult, $result);
|
$this->assertEquals($expectedResult, $result);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -23,7 +23,7 @@ class TimeZoneTest extends PHPUnit_Framework_TestCase
|
|||||||
);
|
);
|
||||||
|
|
||||||
foreach ($timezoneValues as $timezoneValue) {
|
foreach ($timezoneValues as $timezoneValue) {
|
||||||
$result = call_user_func(array('PHPExcel_Shared_TimeZone','setTimezone'),$timezoneValue);
|
$result = call_user_func(array('PHPExcel_Shared_TimeZone','setTimezone'), $timezoneValue);
|
||||||
$this->assertTrue($result);
|
$this->assertTrue($result);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -32,8 +32,7 @@ class TimeZoneTest extends PHPUnit_Framework_TestCase
|
|||||||
public function testSetTimezoneWithInvalidValue()
|
public function testSetTimezoneWithInvalidValue()
|
||||||
{
|
{
|
||||||
$unsupportedTimezone = 'Etc/GMT+10';
|
$unsupportedTimezone = 'Etc/GMT+10';
|
||||||
$result = call_user_func(array('PHPExcel_Shared_TimeZone','setTimezone'),$unsupportedTimezone);
|
$result = call_user_func(array('PHPExcel_Shared_TimeZone','setTimezone'), $unsupportedTimezone);
|
||||||
$this->assertFalse($result);
|
$this->assertFalse($result);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -21,7 +21,7 @@ class ColorTest 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_Style_Color','getRed'),$args);
|
$result = call_user_func_array(array('PHPExcel_Style_Color','getRed'), $args);
|
||||||
$this->assertEquals($expectedResult, $result);
|
$this->assertEquals($expectedResult, $result);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -37,7 +37,7 @@ class ColorTest 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_Style_Color','getGreen'),$args);
|
$result = call_user_func_array(array('PHPExcel_Style_Color','getGreen'), $args);
|
||||||
$this->assertEquals($expectedResult, $result);
|
$this->assertEquals($expectedResult, $result);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -53,7 +53,7 @@ class ColorTest 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_Style_Color','getBlue'),$args);
|
$result = call_user_func_array(array('PHPExcel_Style_Color','getBlue'), $args);
|
||||||
$this->assertEquals($expectedResult, $result);
|
$this->assertEquals($expectedResult, $result);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -69,7 +69,7 @@ class ColorTest 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_Style_Color','changeBrightness'),$args);
|
$result = call_user_func_array(array('PHPExcel_Style_Color','changeBrightness'), $args);
|
||||||
$this->assertEquals($expectedResult, $result);
|
$this->assertEquals($expectedResult, $result);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -77,5 +77,4 @@ class ColorTest extends PHPUnit_Framework_TestCase
|
|||||||
{
|
{
|
||||||
return new testDataFileIterator('rawTestData/Style/ColorChangeBrightness.data');
|
return new testDataFileIterator('rawTestData/Style/ColorChangeBrightness.data');
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -24,7 +24,7 @@ class NumberFormatTest 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_Style_NumberFormat','toFormattedString'),$args);
|
$result = call_user_func_array(array('PHPExcel_Style_NumberFormat','toFormattedString'), $args);
|
||||||
$this->assertEquals($expectedResult, $result);
|
$this->assertEquals($expectedResult, $result);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -32,5 +32,4 @@ class NumberFormatTest extends PHPUnit_Framework_TestCase
|
|||||||
{
|
{
|
||||||
return new testDataFileIterator('rawTestData/Style/NumberFormat.data');
|
return new testDataFileIterator('rawTestData/Style/NumberFormat.data');
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -105,5 +105,4 @@ class RuleTest extends PHPUnit_Framework_TestCase
|
|||||||
$result = clone $this->_testAutoFilterRuleObject;
|
$result = clone $this->_testAutoFilterRuleObject;
|
||||||
$this->assertInstanceOf('PHPExcel_Worksheet_AutoFilter_Column_Rule', $result);
|
$this->assertInstanceOf('PHPExcel_Worksheet_AutoFilter_Column_Rule', $result);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -143,7 +143,7 @@ class AutofilterColumnTest extends PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
foreach ($attributeSet as $attributeName => $attributeValue) {
|
foreach ($attributeSet as $attributeName => $attributeValue) {
|
||||||
// Setters return the instance to implement the fluent interface
|
// Setters return the instance to implement the fluent interface
|
||||||
$result = $this->_testAutoFilterColumnObject->setAttribute($attributeName,$attributeValue);
|
$result = $this->_testAutoFilterColumnObject->setAttribute($attributeName, $attributeValue);
|
||||||
$this->assertInstanceOf('PHPExcel_Worksheet_AutoFilter_Column', $result);
|
$this->assertInstanceOf('PHPExcel_Worksheet_AutoFilter_Column', $result);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -169,5 +169,4 @@ class AutofilterColumnTest extends PHPUnit_Framework_TestCase
|
|||||||
$result = clone $this->_testAutoFilterColumnObject;
|
$result = clone $this->_testAutoFilterColumnObject;
|
||||||
$this->assertInstanceOf('PHPExcel_Worksheet_AutoFilter_Column', $result);
|
$this->assertInstanceOf('PHPExcel_Worksheet_AutoFilter_Column', $result);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -148,7 +148,7 @@ class AutoFilterTest extends PHPUnit_Framework_TestCase
|
|||||||
// objects for each column we set indexed by the column ID
|
// objects for each column we set indexed by the column ID
|
||||||
$this->assertInternalType('array', $result);
|
$this->assertInternalType('array', $result);
|
||||||
$this->assertEquals(1, count($result));
|
$this->assertEquals(1, count($result));
|
||||||
$this->assertArrayHasKey($expectedResult,$result);
|
$this->assertArrayHasKey($expectedResult, $result);
|
||||||
$this->assertInstanceOf('PHPExcel_Worksheet_AutoFilter_Column', $result[$expectedResult]);
|
$this->assertInstanceOf('PHPExcel_Worksheet_AutoFilter_Column', $result[$expectedResult]);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -176,7 +176,7 @@ class AutoFilterTest extends PHPUnit_Framework_TestCase
|
|||||||
// objects for each column we set indexed by the column ID
|
// objects for each column we set indexed by the column ID
|
||||||
$this->assertInternalType('array', $result);
|
$this->assertInternalType('array', $result);
|
||||||
$this->assertEquals(1, count($result));
|
$this->assertEquals(1, count($result));
|
||||||
$this->assertArrayHasKey($expectedResult,$result);
|
$this->assertArrayHasKey($expectedResult, $result);
|
||||||
$this->assertInstanceOf('PHPExcel_Worksheet_AutoFilter_Column', $result[$expectedResult]);
|
$this->assertInstanceOf('PHPExcel_Worksheet_AutoFilter_Column', $result[$expectedResult]);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -216,7 +216,7 @@ class AutoFilterTest extends PHPUnit_Framework_TestCase
|
|||||||
$this->assertInternalType('array', $result);
|
$this->assertInternalType('array', $result);
|
||||||
$this->assertEquals(count($columnIndexes), count($result));
|
$this->assertEquals(count($columnIndexes), count($result));
|
||||||
foreach ($columnIndexes as $columnIndex) {
|
foreach ($columnIndexes as $columnIndex) {
|
||||||
$this->assertArrayHasKey($columnIndex,$result);
|
$this->assertArrayHasKey($columnIndex, $result);
|
||||||
$this->assertInstanceOf('PHPExcel_Worksheet_AutoFilter_Column', $result[$columnIndex]);
|
$this->assertInstanceOf('PHPExcel_Worksheet_AutoFilter_Column', $result[$columnIndex]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -249,7 +249,7 @@ class AutoFilterTest extends PHPUnit_Framework_TestCase
|
|||||||
foreach ($columnIndexes as $columnIndex => $columnID) {
|
foreach ($columnIndexes as $columnIndex => $columnID) {
|
||||||
$result = $this->_testAutoFilterObject->getColumnByOffset($columnIndex);
|
$result = $this->_testAutoFilterObject->getColumnByOffset($columnIndex);
|
||||||
$this->assertInstanceOf('PHPExcel_Worksheet_AutoFilter_Column', $result);
|
$this->assertInstanceOf('PHPExcel_Worksheet_AutoFilter_Column', $result);
|
||||||
$this->assertEquals($result->getColumnIndex(),$columnID);
|
$this->assertEquals($result->getColumnIndex(), $columnID);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -336,5 +336,4 @@ class AutoFilterTest extends PHPUnit_Framework_TestCase
|
|||||||
$result = clone $this->_testAutoFilterObject;
|
$result = clone $this->_testAutoFilterObject;
|
||||||
$this->assertInstanceOf('PHPExcel_Worksheet_AutoFilter', $result);
|
$this->assertInstanceOf('PHPExcel_Worksheet_AutoFilter', $result);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -5,8 +5,7 @@ class CellCollectionTest extends PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
public function setUp()
|
public function setUp()
|
||||||
{
|
{
|
||||||
if (!defined('PHPEXCEL_ROOT'))
|
if (!defined('PHPEXCEL_ROOT')) {
|
||||||
{
|
|
||||||
define('PHPEXCEL_ROOT', APPLICATION_PATH . '/');
|
define('PHPEXCEL_ROOT', APPLICATION_PATH . '/');
|
||||||
}
|
}
|
||||||
require_once(PHPEXCEL_ROOT . 'PHPExcel/Autoloader.php');
|
require_once(PHPEXCEL_ROOT . 'PHPExcel/Autoloader.php');
|
||||||
@ -27,5 +26,4 @@ class CellCollectionTest extends PHPUnit_Framework_TestCase
|
|||||||
PHPExcel_CachedObjectStorageFactory::finalize();
|
PHPExcel_CachedObjectStorageFactory::finalize();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -61,7 +61,7 @@ class ColumnIteratorTest extends PHPUnit_Framework_TestCase
|
|||||||
$iterator->seek('D');
|
$iterator->seek('D');
|
||||||
$this->assertEquals($columnIndexResult, $iterator->key());
|
$this->assertEquals($columnIndexResult, $iterator->key());
|
||||||
|
|
||||||
for($i = 1; $i < array_search($columnIndexResult, $ranges); $i++) {
|
for ($i = 1; $i < array_search($columnIndexResult, $ranges); $i++) {
|
||||||
$iterator->prev();
|
$iterator->prev();
|
||||||
$expectedResult = $ranges[array_search($columnIndexResult, $ranges) - $i];
|
$expectedResult = $ranges[array_search($columnIndexResult, $ranges) - $i];
|
||||||
$this->assertEquals($expectedResult, $iterator->key());
|
$this->assertEquals($expectedResult, $iterator->key());
|
||||||
@ -85,5 +85,4 @@ class ColumnIteratorTest extends PHPUnit_Framework_TestCase
|
|||||||
$iterator = new PHPExcel_Worksheet_ColumnIterator($this->mockWorksheet, 'B', 'D');
|
$iterator = new PHPExcel_Worksheet_ColumnIterator($this->mockWorksheet, 'B', 'D');
|
||||||
$iterator->prev();
|
$iterator->prev();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -61,7 +61,7 @@ class RowCellIteratorTest extends PHPUnit_Framework_TestCase
|
|||||||
$iterator->seek('D');
|
$iterator->seek('D');
|
||||||
$this->assertEquals($RowCellIndexResult, $iterator->key());
|
$this->assertEquals($RowCellIndexResult, $iterator->key());
|
||||||
|
|
||||||
for($i = 1; $i < array_search($RowCellIndexResult, $ranges); $i++) {
|
for ($i = 1; $i < array_search($RowCellIndexResult, $ranges); $i++) {
|
||||||
$iterator->prev();
|
$iterator->prev();
|
||||||
$expectedResult = $ranges[array_search($RowCellIndexResult, $ranges) - $i];
|
$expectedResult = $ranges[array_search($RowCellIndexResult, $ranges) - $i];
|
||||||
$this->assertEquals($expectedResult, $iterator->key());
|
$this->assertEquals($expectedResult, $iterator->key());
|
||||||
@ -85,5 +85,4 @@ class RowCellIteratorTest extends PHPUnit_Framework_TestCase
|
|||||||
$iterator = new PHPExcel_Worksheet_RowCellIterator($this->mockWorksheet, 2, 'B', 'D');
|
$iterator = new PHPExcel_Worksheet_RowCellIterator($this->mockWorksheet, 2, 'B', 'D');
|
||||||
$iterator->prev();
|
$iterator->prev();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -60,7 +60,7 @@ class RowIteratorTest extends PHPUnit_Framework_TestCase
|
|||||||
$iterator->seek(4);
|
$iterator->seek(4);
|
||||||
$this->assertEquals($columnIndexResult, $iterator->key());
|
$this->assertEquals($columnIndexResult, $iterator->key());
|
||||||
|
|
||||||
for($i = 1; $i < $columnIndexResult-1; $i++) {
|
for ($i = 1; $i < $columnIndexResult-1; $i++) {
|
||||||
$iterator->prev();
|
$iterator->prev();
|
||||||
$this->assertEquals($columnIndexResult - $i, $iterator->key());
|
$this->assertEquals($columnIndexResult - $i, $iterator->key());
|
||||||
}
|
}
|
||||||
@ -83,5 +83,4 @@ class RowIteratorTest extends PHPUnit_Framework_TestCase
|
|||||||
$iterator = new PHPExcel_Worksheet_RowIterator($this->mockWorksheet, 2, 4);
|
$iterator = new PHPExcel_Worksheet_RowIterator($this->mockWorksheet, 2, 4);
|
||||||
$iterator->prev();
|
$iterator->prev();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -66,7 +66,7 @@ class Complex
|
|||||||
if (is_array($realPart)) {
|
if (is_array($realPart)) {
|
||||||
// We have an array of (potentially) real and imaginary parts, and any suffix
|
// We have an array of (potentially) real and imaginary parts, and any suffix
|
||||||
list ($realPart, $imaginaryPart, $suffix) = array_values($realPart) + array(0.0, 0.0, 'i');
|
list ($realPart, $imaginaryPart, $suffix) = array_values($realPart) + array(0.0, 0.0, 'i');
|
||||||
} elseif((is_string($realPart)) || (is_numeric($realPart))) {
|
} elseif ((is_string($realPart)) || (is_numeric($realPart))) {
|
||||||
// We've been given a string to parse to extract the real and imaginary parts, and any suffix
|
// We've been given a string to parse to extract the real and imaginary parts, and any suffix
|
||||||
list ($realPart, $imaginaryPart, $suffix) = self::_parseComplex($realPart);
|
list ($realPart, $imaginaryPart, $suffix) = self::_parseComplex($realPart);
|
||||||
}
|
}
|
||||||
@ -93,7 +93,8 @@ class Complex
|
|||||||
return $this->suffix;
|
return $this->suffix;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function __toString() {
|
public function __toString()
|
||||||
|
{
|
||||||
$str = "";
|
$str = "";
|
||||||
if ($this->imaginaryPart != 0.0) {
|
if ($this->imaginaryPart != 0.0) {
|
||||||
if (abs($this->imaginaryPart) != 1.0) {
|
if (abs($this->imaginaryPart) != 1.0) {
|
||||||
@ -103,13 +104,14 @@ class Complex
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($this->realPart != 0.0) {
|
if ($this->realPart != 0.0) {
|
||||||
if (($str) && ($this->imaginaryPart > 0.0))
|
if (($str) && ($this->imaginaryPart > 0.0)) {
|
||||||
$str = "+" . $str;
|
$str = "+" . $str;
|
||||||
|
}
|
||||||
$str = $this->realPart . $str;
|
$str = $this->realPart . $str;
|
||||||
}
|
}
|
||||||
if (!$str)
|
if (!$str) {
|
||||||
$str = "0.0";
|
$str = "0.0";
|
||||||
|
}
|
||||||
return $str;
|
return $str;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -90,17 +90,17 @@ class testDataFileIterator implements Iterator
|
|||||||
$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] == '"')) {
|
||||||
$dataValue = substr($dataValue,1,-1);
|
$dataValue = substr($dataValue, 1, -1);
|
||||||
} 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);
|
||||||
}
|
}
|
||||||
@ -124,7 +124,7 @@ class testDataFileIterator implements Iterator
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (strpos($dataValue,'.') !== false) {
|
if (strpos($dataValue, '.') !== false) {
|
||||||
$dataValue = (float) $dataValue;
|
$dataValue = (float) $dataValue;
|
||||||
} else {
|
} else {
|
||||||
$dataValue = (int) $dataValue;
|
$dataValue = (int) $dataValue;
|
||||||
|
Loading…
Reference in New Issue
Block a user