ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
StringTest Class Reference
+ Inheritance diagram for StringTest:
+ Collaboration diagram for StringTest:

Public Member Functions

 setUp ()
 
 testGetIsMbStringEnabled ()
 
 testGetIsIconvEnabled ()
 
 testGetDecimalSeparator ()
 
 testSetDecimalSeparator ()
 
 testGetThousandsSeparator ()
 
 testSetThousandsSeparator ()
 
 testGetCurrencyCode ()
 
 testSetCurrencyCode ()
 

Detailed Description

Definition at line 6 of file StringTest.php.

Member Function Documentation

◆ setUp()

StringTest::setUp ( )

Definition at line 9 of file StringTest.php.

10 {
11 if (!defined('PHPEXCEL_ROOT')) {
12 define('PHPEXCEL_ROOT', APPLICATION_PATH . '/');
13 }
14 require_once(PHPEXCEL_ROOT . 'PHPExcel/Autoloader.php');
15 }
defined( 'APPLICATION_ENV')||define( 'APPLICATION_ENV'
Definition: bootstrap.php:27

References defined.

◆ testGetCurrencyCode()

StringTest::testGetCurrencyCode ( )

Definition at line 65 of file StringTest.php.

66 {
67 $localeconv = localeconv();
68
69 $expectedResult = (!empty($localeconv['currency_symbol'])) ? $localeconv['currency_symbol'] : '$';
70 $result = call_user_func(array('PHPExcel_Shared_String','getCurrencyCode'));
71 $this->assertEquals($expectedResult, $result);
72 }
$result

References $result.

◆ testGetDecimalSeparator()

StringTest::testGetDecimalSeparator ( )

Definition at line 29 of file StringTest.php.

30 {
31 $localeconv = localeconv();
32
33 $expectedResult = (!empty($localeconv['decimal_point'])) ? $localeconv['decimal_point'] : ',';
34 $result = call_user_func(array('PHPExcel_Shared_String','getDecimalSeparator'));
35 $this->assertEquals($expectedResult, $result);
36 }

References $result.

◆ testGetIsIconvEnabled()

StringTest::testGetIsIconvEnabled ( )

Definition at line 23 of file StringTest.php.

24 {
25 $result = call_user_func(array('PHPExcel_Shared_String','getIsIconvEnabled'));
26 $this->assertTrue($result);
27 }

References $result.

◆ testGetIsMbStringEnabled()

StringTest::testGetIsMbStringEnabled ( )

Definition at line 17 of file StringTest.php.

18 {
19 $result = call_user_func(array('PHPExcel_Shared_String','getIsMbstringEnabled'));
20 $this->assertTrue($result);
21 }

References $result.

◆ testGetThousandsSeparator()

StringTest::testGetThousandsSeparator ( )

Definition at line 47 of file StringTest.php.

48 {
49 $localeconv = localeconv();
50
51 $expectedResult = (!empty($localeconv['thousands_sep'])) ? $localeconv['thousands_sep'] : ',';
52 $result = call_user_func(array('PHPExcel_Shared_String','getThousandsSeparator'));
53 $this->assertEquals($expectedResult, $result);
54 }

References $result.

◆ testSetCurrencyCode()

StringTest::testSetCurrencyCode ( )

Definition at line 74 of file StringTest.php.

75 {
76 $expectedResult = '£';
77 $result = call_user_func(array('PHPExcel_Shared_String','setCurrencyCode'),$expectedResult);
78
79 $result = call_user_func(array('PHPExcel_Shared_String','getCurrencyCode'));
80 $this->assertEquals($expectedResult, $result);
81 }

References $result.

◆ testSetDecimalSeparator()

StringTest::testSetDecimalSeparator ( )

Definition at line 38 of file StringTest.php.

39 {
40 $expectedResult = ',';
41 $result = call_user_func(array('PHPExcel_Shared_String','setDecimalSeparator'),$expectedResult);
42
43 $result = call_user_func(array('PHPExcel_Shared_String','getDecimalSeparator'));
44 $this->assertEquals($expectedResult, $result);
45 }

References $result.

◆ testSetThousandsSeparator()

StringTest::testSetThousandsSeparator ( )

Definition at line 56 of file StringTest.php.

57 {
58 $expectedResult = ' ';
59 $result = call_user_func(array('PHPExcel_Shared_String','setThousandsSeparator'),$expectedResult);
60
61 $result = call_user_func(array('PHPExcel_Shared_String','getThousandsSeparator'));
62 $this->assertEquals($expectedResult, $result);
63 }

References $result.


The documentation for this class was generated from the following file: