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

Public Member Functions

 setUp ()
 
 testColumnSort ()
 
 testColumnReverseSort ()
 

Detailed Description

Definition at line 4 of file ReferenceHelperTest.php.

Member Function Documentation

◆ setUp()

ReferenceHelperTest::setUp ( )

Definition at line 7 of file ReferenceHelperTest.php.

References defined.

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

◆ testColumnReverseSort()

ReferenceHelperTest::testColumnReverseSort ( )

Definition at line 36 of file ReferenceHelperTest.php.

References $key, and array.

37  {
38  $columnBase = $columnExpectedResult = array(
39  'A','B','Z',
40  'AA','AB','AZ',
41  'BA','BB','BZ',
42  'ZA','ZB','ZZ',
43  'AAA','AAB','AAZ',
44  'ABA','ABB','ABZ',
45  'AZA','AZB','AZZ',
46  'BAA','BAB','BAZ',
47  'BBA','BBB','BBZ',
48  'BZA','BZB','BZZ'
49  );
50  shuffle($columnBase);
51  $columnExpectedResult = array_reverse($columnExpectedResult);
52  usort($columnBase, array('PHPExcel_ReferenceHelper','columnReverseSort'));
53  foreach($columnBase as $key => $value) {
54  $this->assertEquals($columnExpectedResult[$key], $value);
55  }
56  }
Create styles array
The data for the language used.
$key
Definition: croninfo.php:18

◆ testColumnSort()

ReferenceHelperTest::testColumnSort ( )

Definition at line 15 of file ReferenceHelperTest.php.

References $key, and array.

16  {
17  $columnBase = $columnExpectedResult = array(
18  'A','B','Z',
19  'AA','AB','AZ',
20  'BA','BB','BZ',
21  'ZA','ZB','ZZ',
22  'AAA','AAB','AAZ',
23  'ABA','ABB','ABZ',
24  'AZA','AZB','AZZ',
25  'BAA','BAB','BAZ',
26  'BBA','BBB','BBZ',
27  'BZA','BZB','BZZ'
28  );
29  shuffle($columnBase);
30  usort($columnBase, array('PHPExcel_ReferenceHelper','columnSort'));
31  foreach($columnBase as $key => $value) {
32  $this->assertEquals($columnExpectedResult[$key], $value);
33  }
34  }
Create styles array
The data for the language used.
$key
Definition: croninfo.php:18

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