ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
FunctionsTest.php
Go to the documentation of this file.
1 <?php
2 
3 
4 require_once 'testDataFileIterator.php';
5 
7 {
8 
9  public function setUp()
10  {
11  if (!defined('PHPEXCEL_ROOT'))
12  {
13  define('PHPEXCEL_ROOT', APPLICATION_PATH . '/');
14  }
15  require_once(PHPEXCEL_ROOT . 'PHPExcel/Autoloader.php');
16 
18  }
19 
20  public function testDUMMY()
21  {
23  $this->assertEquals('#Not Yet Implemented', $result);
24  }
25 
26  public function testDIV0()
27  {
29  $this->assertEquals('#DIV/0!', $result);
30  }
31 
32  public function testNA()
33  {
35  $this->assertEquals('#N/A', $result);
36  }
37 
38  public function testNaN()
39  {
41  $this->assertEquals('#NUM!', $result);
42  }
43 
44  public function testNAME()
45  {
47  $this->assertEquals('#NAME?', $result);
48  }
49 
50  public function testREF()
51  {
53  $this->assertEquals('#REF!', $result);
54  }
55 
56  public function testNULL()
57  {
59  $this->assertEquals('#NULL!', $result);
60  }
61 
62  public function testVALUE()
63  {
65  $this->assertEquals('#VALUE!', $result);
66  }
67 
71  public function testIS_BLANK()
72  {
73  $args = func_get_args();
74  $expectedResult = array_pop($args);
75  $result = call_user_func_array(array('PHPExcel_Calculation_Functions','IS_BLANK'),$args);
76  $this->assertEquals($expectedResult, $result, NULL, 1E-8);
77  }
78 
79  public function providerIS_BLANK()
80  {
81  return new testDataFileIterator('rawTestData/Calculation/Functions/IS_BLANK.data');
82  }
83 
87  public function testIS_ERR()
88  {
89  $args = func_get_args();
90  $expectedResult = array_pop($args);
91  $result = call_user_func_array(array('PHPExcel_Calculation_Functions','IS_ERR'),$args);
92  $this->assertEquals($expectedResult, $result, NULL, 1E-8);
93  }
94 
95  public function providerIS_ERR()
96  {
97  return new testDataFileIterator('rawTestData/Calculation/Functions/IS_ERR.data');
98  }
99 
103  public function testIS_ERROR()
104  {
105  $args = func_get_args();
106  $expectedResult = array_pop($args);
107  $result = call_user_func_array(array('PHPExcel_Calculation_Functions','IS_ERROR'),$args);
108  $this->assertEquals($expectedResult, $result, NULL, 1E-8);
109  }
110 
111  public function providerIS_ERROR()
112  {
113  return new testDataFileIterator('rawTestData/Calculation/Functions/IS_ERROR.data');
114  }
115 
119  public function testERROR_TYPE()
120  {
121  $args = func_get_args();
122  $expectedResult = array_pop($args);
123  $result = call_user_func_array(array('PHPExcel_Calculation_Functions','ERROR_TYPE'),$args);
124  $this->assertEquals($expectedResult, $result, NULL, 1E-8);
125  }
126 
127  public function providerERROR_TYPE()
128  {
129  return new testDataFileIterator('rawTestData/Calculation/Functions/ERROR_TYPE.data');
130  }
131 
135  public function testIS_LOGICAL()
136  {
137  $args = func_get_args();
138  $expectedResult = array_pop($args);
139  $result = call_user_func_array(array('PHPExcel_Calculation_Functions','IS_LOGICAL'),$args);
140  $this->assertEquals($expectedResult, $result, NULL, 1E-8);
141  }
142 
143  public function providerIS_LOGICAL()
144  {
145  return new testDataFileIterator('rawTestData/Calculation/Functions/IS_LOGICAL.data');
146  }
147 
151  public function testIS_NA()
152  {
153  $args = func_get_args();
154  $expectedResult = array_pop($args);
155  $result = call_user_func_array(array('PHPExcel_Calculation_Functions','IS_NA'),$args);
156  $this->assertEquals($expectedResult, $result, NULL, 1E-8);
157  }
158 
159  public function providerIS_NA()
160  {
161  return new testDataFileIterator('rawTestData/Calculation/Functions/IS_NA.data');
162  }
163 
167  public function testIS_NUMBER()
168  {
169  $args = func_get_args();
170  $expectedResult = array_pop($args);
171  $result = call_user_func_array(array('PHPExcel_Calculation_Functions','IS_NUMBER'),$args);
172  $this->assertEquals($expectedResult, $result, NULL, 1E-8);
173  }
174 
175  public function providerIS_NUMBER()
176  {
177  return new testDataFileIterator('rawTestData/Calculation/Functions/IS_NUMBER.data');
178  }
179 
183  public function testIS_TEXT()
184  {
185  $args = func_get_args();
186  $expectedResult = array_pop($args);
187  $result = call_user_func_array(array('PHPExcel_Calculation_Functions','IS_TEXT'),$args);
188  $this->assertEquals($expectedResult, $result, NULL, 1E-8);
189  }
190 
191  public function providerIS_TEXT()
192  {
193  return new testDataFileIterator('rawTestData/Calculation/Functions/IS_TEXT.data');
194  }
195 
199  public function testIS_NONTEXT()
200  {
201  $args = func_get_args();
202  $expectedResult = array_pop($args);
203  $result = call_user_func_array(array('PHPExcel_Calculation_Functions','IS_NONTEXT'),$args);
204  $this->assertEquals($expectedResult, $result, NULL, 1E-8);
205  }
206 
207  public function providerIS_NONTEXT()
208  {
209  return new testDataFileIterator('rawTestData/Calculation/Functions/IS_NONTEXT.data');
210  }
211 
215  public function testIS_EVEN()
216  {
217  $args = func_get_args();
218  $expectedResult = array_pop($args);
219  $result = call_user_func_array(array('PHPExcel_Calculation_Functions','IS_EVEN'),$args);
220  $this->assertEquals($expectedResult, $result, NULL, 1E-8);
221  }
222 
223  public function providerIS_EVEN()
224  {
225  return new testDataFileIterator('rawTestData/Calculation/Functions/IS_EVEN.data');
226  }
227 
231  public function testIS_ODD()
232  {
233  $args = func_get_args();
234  $expectedResult = array_pop($args);
235  $result = call_user_func_array(array('PHPExcel_Calculation_Functions','IS_ODD'),$args);
236  $this->assertEquals($expectedResult, $result, NULL, 1E-8);
237  }
238 
239  public function providerIS_ODD()
240  {
241  return new testDataFileIterator('rawTestData/Calculation/Functions/IS_ODD.data');
242  }
243 
247  public function testTYPE()
248  {
249  $args = func_get_args();
250  $expectedResult = array_pop($args);
251  $result = call_user_func_array(array('PHPExcel_Calculation_Functions','TYPE'),$args);
252  $this->assertEquals($expectedResult, $result, NULL, 1E-8);
253  }
254 
255  public function providerTYPE()
256  {
257  return new testDataFileIterator('rawTestData/Calculation/Functions/TYPE.data');
258  }
259 
263  public function testN()
264  {
265  $args = func_get_args();
266  $expectedResult = array_pop($args);
267  $result = call_user_func_array(array('PHPExcel_Calculation_Functions','N'),$args);
268  $this->assertEquals($expectedResult, $result, NULL, 1E-8);
269  }
270 
271  public function providerN()
272  {
273  return new testDataFileIterator('rawTestData/Calculation/Functions/N.data');
274  }
275 
276 }
testIS_ERR()
providerIS_ERR
testIS_TEXT()
providerIS_TEXT
$result
testIS_NA()
providerIS_NA
const COMPATIBILITY_EXCEL
constants
Definition: Functions.php:62
testERROR_TYPE()
providerERROR_TYPE
testN()
providerN
testIS_NONTEXT()
providerIS_NONTEXT
testTYPE()
providerTYPE
Create styles array
The data for the language used.
testIS_ERROR()
providerIS_ERROR
testIS_EVEN()
providerIS_EVEN
testIS_ODD()
providerIS_ODD
testIS_NUMBER()
providerIS_NUMBER
defined( 'APPLICATION_ENV')||define( 'APPLICATION_ENV'
Definition: bootstrap.php:27
testIS_BLANK()
providerIS_BLANK
static setCompatibilityMode($compatibilityMode)
Definition: Functions.php:116
testIS_LOGICAL()
providerIS_LOGICAL