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

Public Member Functions

 setUp ()
 
 testCHAR ()
 providerCHAR More...
 
 providerCHAR ()
 
 testCODE ()
 providerCODE More...
 
 providerCODE ()
 
 testCONCATENATE ()
 providerCONCATENATE More...
 
 providerCONCATENATE ()
 
 testLEFT ()
 providerLEFT More...
 
 providerLEFT ()
 
 testMID ()
 providerMID More...
 
 providerMID ()
 
 testRIGHT ()
 providerRIGHT More...
 
 providerRIGHT ()
 
 testLOWER ()
 providerLOWER More...
 
 providerLOWER ()
 
 testUPPER ()
 providerUPPER More...
 
 providerUPPER ()
 
 testPROPER ()
 providerPROPER More...
 
 providerPROPER ()
 
 testLEN ()
 providerLEN More...
 
 providerLEN ()
 
 testSEARCH ()
 providerSEARCH More...
 
 providerSEARCH ()
 
 testFIND ()
 providerFIND More...
 
 providerFIND ()
 
 testREPLACE ()
 providerREPLACE More...
 
 providerREPLACE ()
 
 testSUBSTITUTE ()
 providerSUBSTITUTE More...
 
 providerSUBSTITUTE ()
 
 testTRIM ()
 providerTRIM More...
 
 providerTRIM ()
 
 testCLEAN ()
 providerCLEAN More...
 
 providerCLEAN ()
 
 testDOLLAR ()
 providerDOLLAR More...
 
 providerDOLLAR ()
 
 testFIXED ()
 providerFIXED More...
 
 providerFIXED ()
 
 testT ()
 providerT More...
 
 providerT ()
 
 testTEXT ()
 providerTEXT More...
 
 providerTEXT ()
 
 testVALUE ()
 providerVALUE More...
 
 providerVALUE ()
 

Detailed Description

Definition at line 6 of file TextDataTest.php.

Member Function Documentation

◆ providerCHAR()

TextDataTest::providerCHAR ( )

Definition at line 31 of file TextDataTest.php.

32  {
33  return new testDataFileIterator('rawTestData/Calculation/TextData/CHAR.data');
34  }

◆ providerCLEAN()

TextDataTest::providerCLEAN ( )

Definition at line 271 of file TextDataTest.php.

272  {
273  return new testDataFileIterator('rawTestData/Calculation/TextData/CLEAN.data');
274  }

◆ providerCODE()

TextDataTest::providerCODE ( )

Definition at line 47 of file TextDataTest.php.

48  {
49  return new testDataFileIterator('rawTestData/Calculation/TextData/CODE.data');
50  }

◆ providerCONCATENATE()

TextDataTest::providerCONCATENATE ( )

Definition at line 63 of file TextDataTest.php.

64  {
65  return new testDataFileIterator('rawTestData/Calculation/TextData/CONCATENATE.data');
66  }

◆ providerDOLLAR()

TextDataTest::providerDOLLAR ( )

Definition at line 287 of file TextDataTest.php.

288  {
289  return new testDataFileIterator('rawTestData/Calculation/TextData/DOLLAR.data');
290  }

◆ providerFIND()

TextDataTest::providerFIND ( )

Definition at line 207 of file TextDataTest.php.

208  {
209  return new testDataFileIterator('rawTestData/Calculation/TextData/FIND.data');
210  }

◆ providerFIXED()

TextDataTest::providerFIXED ( )

Definition at line 303 of file TextDataTest.php.

304  {
305  return new testDataFileIterator('rawTestData/Calculation/TextData/FIXED.data');
306  }

◆ providerLEFT()

TextDataTest::providerLEFT ( )

Definition at line 79 of file TextDataTest.php.

80  {
81  return new testDataFileIterator('rawTestData/Calculation/TextData/LEFT.data');
82  }

◆ providerLEN()

TextDataTest::providerLEN ( )

Definition at line 175 of file TextDataTest.php.

176  {
177  return new testDataFileIterator('rawTestData/Calculation/TextData/LEN.data');
178  }

◆ providerLOWER()

TextDataTest::providerLOWER ( )

Definition at line 127 of file TextDataTest.php.

128  {
129  return new testDataFileIterator('rawTestData/Calculation/TextData/LOWER.data');
130  }

◆ providerMID()

TextDataTest::providerMID ( )

Definition at line 95 of file TextDataTest.php.

96  {
97  return new testDataFileIterator('rawTestData/Calculation/TextData/MID.data');
98  }

◆ providerPROPER()

TextDataTest::providerPROPER ( )

Definition at line 159 of file TextDataTest.php.

160  {
161  return new testDataFileIterator('rawTestData/Calculation/TextData/PROPER.data');
162  }

◆ providerREPLACE()

TextDataTest::providerREPLACE ( )

Definition at line 223 of file TextDataTest.php.

224  {
225  return new testDataFileIterator('rawTestData/Calculation/TextData/REPLACE.data');
226  }

◆ providerRIGHT()

TextDataTest::providerRIGHT ( )

Definition at line 111 of file TextDataTest.php.

112  {
113  return new testDataFileIterator('rawTestData/Calculation/TextData/RIGHT.data');
114  }

◆ providerSEARCH()

TextDataTest::providerSEARCH ( )

Definition at line 191 of file TextDataTest.php.

192  {
193  return new testDataFileIterator('rawTestData/Calculation/TextData/SEARCH.data');
194  }

◆ providerSUBSTITUTE()

TextDataTest::providerSUBSTITUTE ( )

Definition at line 239 of file TextDataTest.php.

240  {
241  return new testDataFileIterator('rawTestData/Calculation/TextData/SUBSTITUTE.data');
242  }

◆ providerT()

TextDataTest::providerT ( )

Definition at line 319 of file TextDataTest.php.

320  {
321  return new testDataFileIterator('rawTestData/Calculation/TextData/T.data');
322  }

◆ providerTEXT()

TextDataTest::providerTEXT ( )

Definition at line 340 of file TextDataTest.php.

341  {
342  return new testDataFileIterator('rawTestData/Calculation/TextData/TEXT.data');
343  }

◆ providerTRIM()

TextDataTest::providerTRIM ( )

Definition at line 255 of file TextDataTest.php.

256  {
257  return new testDataFileIterator('rawTestData/Calculation/TextData/TRIM.data');
258  }

◆ providerUPPER()

TextDataTest::providerUPPER ( )

Definition at line 143 of file TextDataTest.php.

144  {
145  return new testDataFileIterator('rawTestData/Calculation/TextData/UPPER.data');
146  }

◆ providerVALUE()

TextDataTest::providerVALUE ( )

Definition at line 360 of file TextDataTest.php.

361  {
362  return new testDataFileIterator('rawTestData/Calculation/TextData/VALUE.data');
363  }

◆ setUp()

TextDataTest::setUp ( )

Definition at line 9 of file TextDataTest.php.

References PHPExcel_Calculation_Functions\COMPATIBILITY_EXCEL, defined, and PHPExcel_Calculation_Functions\setCompatibilityMode().

10  {
11  if (!defined('PHPEXCEL_ROOT'))
12  {
13  define('PHPEXCEL_ROOT', APPLICATION_PATH . '/');
14  }
15  require_once(PHPEXCEL_ROOT . 'PHPExcel/Autoloader.php');
16 
18  }
const COMPATIBILITY_EXCEL
constants
Definition: Functions.php:62
defined( 'APPLICATION_ENV')||define( 'APPLICATION_ENV'
Definition: bootstrap.php:27
static setCompatibilityMode($compatibilityMode)
Definition: Functions.php:116
+ Here is the call graph for this function:

◆ testCHAR()

TextDataTest::testCHAR ( )

providerCHAR

Definition at line 23 of file TextDataTest.php.

References $result, and array.

24  {
25  $args = func_get_args();
26  $expectedResult = array_pop($args);
27  $result = call_user_func_array(array('PHPExcel_Calculation_TextData','CHARACTER'),$args);
28  $this->assertEquals($expectedResult, $result);
29  }
$result
Create styles array
The data for the language used.

◆ testCLEAN()

TextDataTest::testCLEAN ( )

providerCLEAN

Definition at line 263 of file TextDataTest.php.

References $result, and array.

264  {
265  $args = func_get_args();
266  $expectedResult = array_pop($args);
267  $result = call_user_func_array(array('PHPExcel_Calculation_TextData','TRIMNONPRINTABLE'),$args);
268  $this->assertEquals($expectedResult, $result);
269  }
$result
Create styles array
The data for the language used.

◆ testCODE()

TextDataTest::testCODE ( )

providerCODE

Definition at line 39 of file TextDataTest.php.

References $result, and array.

40  {
41  $args = func_get_args();
42  $expectedResult = array_pop($args);
43  $result = call_user_func_array(array('PHPExcel_Calculation_TextData','ASCIICODE'),$args);
44  $this->assertEquals($expectedResult, $result);
45  }
$result
Create styles array
The data for the language used.

◆ testCONCATENATE()

TextDataTest::testCONCATENATE ( )

providerCONCATENATE

Definition at line 55 of file TextDataTest.php.

References $result, and array.

56  {
57  $args = func_get_args();
58  $expectedResult = array_pop($args);
59  $result = call_user_func_array(array('PHPExcel_Calculation_TextData','CONCATENATE'),$args);
60  $this->assertEquals($expectedResult, $result);
61  }
$result
Create styles array
The data for the language used.

◆ testDOLLAR()

TextDataTest::testDOLLAR ( )

providerDOLLAR

Definition at line 279 of file TextDataTest.php.

References $result, and array.

280  {
281  $args = func_get_args();
282  $expectedResult = array_pop($args);
283  $result = call_user_func_array(array('PHPExcel_Calculation_TextData','DOLLAR'),$args);
284  $this->assertEquals($expectedResult, $result);
285  }
$result
Create styles array
The data for the language used.

◆ testFIND()

TextDataTest::testFIND ( )

providerFIND

Definition at line 199 of file TextDataTest.php.

References $result, and array.

200  {
201  $args = func_get_args();
202  $expectedResult = array_pop($args);
203  $result = call_user_func_array(array('PHPExcel_Calculation_TextData','SEARCHSENSITIVE'),$args);
204  $this->assertEquals($expectedResult, $result);
205  }
$result
Create styles array
The data for the language used.

◆ testFIXED()

TextDataTest::testFIXED ( )

providerFIXED

Definition at line 295 of file TextDataTest.php.

References $result, and array.

296  {
297  $args = func_get_args();
298  $expectedResult = array_pop($args);
299  $result = call_user_func_array(array('PHPExcel_Calculation_TextData','FIXEDFORMAT'),$args);
300  $this->assertEquals($expectedResult, $result);
301  }
$result
Create styles array
The data for the language used.

◆ testLEFT()

TextDataTest::testLEFT ( )

providerLEFT

Definition at line 71 of file TextDataTest.php.

References $result, and array.

72  {
73  $args = func_get_args();
74  $expectedResult = array_pop($args);
75  $result = call_user_func_array(array('PHPExcel_Calculation_TextData','LEFT'),$args);
76  $this->assertEquals($expectedResult, $result);
77  }
$result
Create styles array
The data for the language used.

◆ testLEN()

TextDataTest::testLEN ( )

providerLEN

Definition at line 167 of file TextDataTest.php.

References $result, and array.

168  {
169  $args = func_get_args();
170  $expectedResult = array_pop($args);
171  $result = call_user_func_array(array('PHPExcel_Calculation_TextData','STRINGLENGTH'),$args);
172  $this->assertEquals($expectedResult, $result);
173  }
$result
Create styles array
The data for the language used.

◆ testLOWER()

TextDataTest::testLOWER ( )

providerLOWER

Definition at line 119 of file TextDataTest.php.

References $result, and array.

120  {
121  $args = func_get_args();
122  $expectedResult = array_pop($args);
123  $result = call_user_func_array(array('PHPExcel_Calculation_TextData','LOWERCASE'),$args);
124  $this->assertEquals($expectedResult, $result);
125  }
$result
Create styles array
The data for the language used.

◆ testMID()

TextDataTest::testMID ( )

providerMID

Definition at line 87 of file TextDataTest.php.

References $result, and array.

88  {
89  $args = func_get_args();
90  $expectedResult = array_pop($args);
91  $result = call_user_func_array(array('PHPExcel_Calculation_TextData','MID'),$args);
92  $this->assertEquals($expectedResult, $result);
93  }
$result
Create styles array
The data for the language used.

◆ testPROPER()

TextDataTest::testPROPER ( )

providerPROPER

Definition at line 151 of file TextDataTest.php.

References $result, and array.

152  {
153  $args = func_get_args();
154  $expectedResult = array_pop($args);
155  $result = call_user_func_array(array('PHPExcel_Calculation_TextData','PROPERCASE'),$args);
156  $this->assertEquals($expectedResult, $result);
157  }
$result
Create styles array
The data for the language used.

◆ testREPLACE()

TextDataTest::testREPLACE ( )

providerREPLACE

Definition at line 215 of file TextDataTest.php.

References $result, and array.

216  {
217  $args = func_get_args();
218  $expectedResult = array_pop($args);
219  $result = call_user_func_array(array('PHPExcel_Calculation_TextData','REPLACE'),$args);
220  $this->assertEquals($expectedResult, $result);
221  }
$result
Create styles array
The data for the language used.

◆ testRIGHT()

TextDataTest::testRIGHT ( )

providerRIGHT

Definition at line 103 of file TextDataTest.php.

References $result, and array.

104  {
105  $args = func_get_args();
106  $expectedResult = array_pop($args);
107  $result = call_user_func_array(array('PHPExcel_Calculation_TextData','RIGHT'),$args);
108  $this->assertEquals($expectedResult, $result);
109  }
$result
Create styles array
The data for the language used.

◆ testSEARCH()

TextDataTest::testSEARCH ( )

providerSEARCH

Definition at line 183 of file TextDataTest.php.

References $result, and array.

184  {
185  $args = func_get_args();
186  $expectedResult = array_pop($args);
187  $result = call_user_func_array(array('PHPExcel_Calculation_TextData','SEARCHINSENSITIVE'),$args);
188  $this->assertEquals($expectedResult, $result);
189  }
$result
Create styles array
The data for the language used.

◆ testSUBSTITUTE()

TextDataTest::testSUBSTITUTE ( )

providerSUBSTITUTE

Definition at line 231 of file TextDataTest.php.

References $result, and array.

232  {
233  $args = func_get_args();
234  $expectedResult = array_pop($args);
235  $result = call_user_func_array(array('PHPExcel_Calculation_TextData','SUBSTITUTE'),$args);
236  $this->assertEquals($expectedResult, $result);
237  }
$result
Create styles array
The data for the language used.

◆ testT()

TextDataTest::testT ( )

providerT

Definition at line 311 of file TextDataTest.php.

References $result, and array.

312  {
313  $args = func_get_args();
314  $expectedResult = array_pop($args);
315  $result = call_user_func_array(array('PHPExcel_Calculation_TextData','RETURNSTRING'),$args);
316  $this->assertEquals($expectedResult, $result);
317  }
$result
Create styles array
The data for the language used.

◆ testTEXT()

TextDataTest::testTEXT ( )

providerTEXT

Definition at line 327 of file TextDataTest.php.

References $result, and array.

328  {
329  // Enforce decimal and thousands separator values to UK/US, and currency code to USD
330  call_user_func(array('PHPExcel_Shared_String','setDecimalSeparator'),'.');
331  call_user_func(array('PHPExcel_Shared_String','setThousandsSeparator'),',');
332  call_user_func(array('PHPExcel_Shared_String','setCurrencyCode'),'$');
333 
334  $args = func_get_args();
335  $expectedResult = array_pop($args);
336  $result = call_user_func_array(array('PHPExcel_Calculation_TextData','TEXTFORMAT'),$args);
337  $this->assertEquals($expectedResult, $result);
338  }
$result
Create styles array
The data for the language used.

◆ testTRIM()

TextDataTest::testTRIM ( )

providerTRIM

Definition at line 247 of file TextDataTest.php.

References $result, and array.

248  {
249  $args = func_get_args();
250  $expectedResult = array_pop($args);
251  $result = call_user_func_array(array('PHPExcel_Calculation_TextData','TRIMSPACES'),$args);
252  $this->assertEquals($expectedResult, $result);
253  }
$result
Create styles array
The data for the language used.

◆ testUPPER()

TextDataTest::testUPPER ( )

providerUPPER

Definition at line 135 of file TextDataTest.php.

References $result, and array.

136  {
137  $args = func_get_args();
138  $expectedResult = array_pop($args);
139  $result = call_user_func_array(array('PHPExcel_Calculation_TextData','UPPERCASE'),$args);
140  $this->assertEquals($expectedResult, $result);
141  }
$result
Create styles array
The data for the language used.

◆ testVALUE()

TextDataTest::testVALUE ( )

providerVALUE

Definition at line 348 of file TextDataTest.php.

References $result, and array.

349  {
350  call_user_func(array('PHPExcel_Shared_String','setDecimalSeparator'),'.');
351  call_user_func(array('PHPExcel_Shared_String','setThousandsSeparator'),' ');
352  call_user_func(array('PHPExcel_Shared_String','setCurrencyCode'),'$');
353 
354  $args = func_get_args();
355  $expectedResult = array_pop($args);
356  $result = call_user_func_array(array('PHPExcel_Calculation_TextData','VALUE'),$args);
357  $this->assertEquals($expectedResult, $result, NULL, 1E-8);
358  }
$result
Create styles array
The data for the language used.

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