Definition at line 3 of file AdvancedValueBinderTest.php.
◆ provider()
AdvancedValueBinderTest::provider |
( |
| ) |
|
Definition at line 13 of file AdvancedValueBinderTest.php.
References array, PHPExcel_Style_NumberFormat\FORMAT_CURRENCY_USD_SIMPLE, PHPExcel_Style_NumberFormat\FORMAT_PERCENTAGE_00, and setUp().
15 if (!class_exists(
'PHPExcel_Style_NumberFormat')) {
23 array(
'$10.11', 10.11, $currencyUSD,
',',
'.',
'$'),
24 array(
'$1,010.12', 1010.12, $currencyUSD,
',',
'.',
'$'),
25 array(
'$20,20', 20.2, $currencyUSD,
'.',
',',
'$'),
26 array(
'$2.020,20', 2020.2, $currencyUSD,
'.',
',',
'$'),
27 array(
'€2.020,20', 2020.2, $currencyEURO,
'.',
',',
'€'),
28 array(
'€ 2.020,20', 2020.2, $currencyEURO,
'.',
',',
'€'),
29 array(
'€2,020.22', 2020.22, $currencyEURO,
',',
'.',
'€'),
Create styles array
The data for the language used.
◆ setUp()
AdvancedValueBinderTest::setUp |
( |
| ) |
|
Definition at line 5 of file AdvancedValueBinderTest.php.
References defined.
Referenced by provider().
8 define(
'PHPEXCEL_ROOT', APPLICATION_PATH .
'/');
10 require_once(PHPEXCEL_ROOT .
'PHPExcel/Autoloader.php');
defined( 'APPLICATION_ENV')||define( 'APPLICATION_ENV'
◆ testCurrency()
AdvancedValueBinderTest::testCurrency |
( |
|
$value, |
|
|
|
$valueBinded, |
|
|
|
$format, |
|
|
|
$thousandsSeparator, |
|
|
|
$decimalSeparator, |
|
|
|
$currencyCode |
|
) |
| |
provider
Definition at line 36 of file AdvancedValueBinderTest.php.
References array, PHPExcel_Shared_String\setCurrencyCode(), PHPExcel_Shared_String\setDecimalSeparator(), PHPExcel_Shared_String\setThousandsSeparator(), and PHPExcel_Cell_DataType\TYPE_STRING.
38 $sheet = $this->getMock(
40 array(
'getStyle',
'getNumberFormat',
'setFormatCode',
'getCellCacheController')
42 $cache = $this->getMockBuilder(
'PHPExcel_CachedObjectStorage_Memory')
43 ->disableOriginalConstructor()
45 $cache->expects($this->any())
47 ->will($this->returnValue($sheet));
49 $sheet->expects($this->once())
51 ->will($this->returnSelf());
52 $sheet->expects($this->once())
53 ->method(
'getNumberFormat')
54 ->will($this->returnSelf());
55 $sheet->expects($this->once())
56 ->method(
'setFormatCode')
58 ->will($this->returnSelf());
59 $sheet->expects($this->any())
60 ->method(
'getCellCacheController')
61 ->will($this->returnValue($cache));
70 $binder->bindValue($cell, $value);
71 $this->assertEquals($valueBinded, $cell->getValue());
static setCurrencyCode($pValue='$')
Set the currency code.
static setDecimalSeparator($pValue='.')
Set the decimal separator.
static setThousandsSeparator($pValue=',')
Set the thousands separator.
Create styles array
The data for the language used.
The documentation for this class was generated from the following file: