ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
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.

References defined.

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

◆ testGetCurrencyCode()

StringTest::testGetCurrencyCode ( )

Definition at line 65 of file StringTest.php.

References $result, and array.

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
Create styles array
The data for the language used.

◆ testGetDecimalSeparator()

StringTest::testGetDecimalSeparator ( )

Definition at line 29 of file StringTest.php.

References $result, and array.

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  }
$result
Create styles array
The data for the language used.

◆ testGetIsIconvEnabled()

StringTest::testGetIsIconvEnabled ( )

Definition at line 23 of file StringTest.php.

References $result, and array.

24  {
25  $result = call_user_func(array('PHPExcel_Shared_String','getIsIconvEnabled'));
26  $this->assertTrue($result);
27  }
$result
Create styles array
The data for the language used.

◆ testGetIsMbStringEnabled()

StringTest::testGetIsMbStringEnabled ( )

Definition at line 17 of file StringTest.php.

References $result, and array.

18  {
19  $result = call_user_func(array('PHPExcel_Shared_String','getIsMbstringEnabled'));
20  $this->assertTrue($result);
21  }
$result
Create styles array
The data for the language used.

◆ testGetThousandsSeparator()

StringTest::testGetThousandsSeparator ( )

Definition at line 47 of file StringTest.php.

References $result, and array.

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  }
$result
Create styles array
The data for the language used.

◆ testSetCurrencyCode()

StringTest::testSetCurrencyCode ( )

Definition at line 74 of file StringTest.php.

References $result, and array.

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  }
$result
Create styles array
The data for the language used.

◆ testSetDecimalSeparator()

StringTest::testSetDecimalSeparator ( )

Definition at line 38 of file StringTest.php.

References $result, and array.

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  }
$result
Create styles array
The data for the language used.

◆ testSetThousandsSeparator()

StringTest::testSetThousandsSeparator ( )

Definition at line 56 of file StringTest.php.

References $result, and array.

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  }
$result
Create styles array
The data for the language used.

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