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

Public Member Functions

 setUp ()
 
 testAutoloaderNonPHPExcelClass ()
 
 testAutoloaderInvalidPHPExcelClass ()
 
 testAutoloadValidPHPExcelClass ()
 
 testAutoloadInstantiateSuccess ()
 

Detailed Description

Definition at line 4 of file AutoloaderTest.php.

Member Function Documentation

◆ setUp()

AutoloaderTest::setUp ( )

Definition at line 7 of file AutoloaderTest.php.

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

References defined.

◆ testAutoloaderInvalidPHPExcelClass()

AutoloaderTest::testAutoloaderInvalidPHPExcelClass ( )

Definition at line 27 of file AutoloaderTest.php.

28 {
29 $className = 'PHPExcel_Invalid_Class';
30
32 // Must return a boolean...
33 $this->assertTrue(is_bool($result));
34 // ... indicating failure
35 $this->assertFalse($result);
36 }
$result
static Load($pClassName)
Autoload a class identified by name.
Definition: Autoloader.php:71

References $result, and PHPExcel_Autoloader\Load().

+ Here is the call graph for this function:

◆ testAutoloaderNonPHPExcelClass()

AutoloaderTest::testAutoloaderNonPHPExcelClass ( )

Definition at line 16 of file AutoloaderTest.php.

17 {
18 $className = 'InvalidClass';
19
21 // Must return a boolean...
22 $this->assertTrue(is_bool($result));
23 // ... indicating failure
24 $this->assertFalse($result);
25 }

References $result, and PHPExcel_Autoloader\Load().

+ Here is the call graph for this function:

◆ testAutoloadInstantiateSuccess()

AutoloaderTest::testAutoloadInstantiateSuccess ( )

Definition at line 47 of file AutoloaderTest.php.

48 {
50 // Must return an object...
51 $this->assertTrue(is_object($result));
52 // ... of the correct type
53 $this->assertTrue(is_a($result,'PHPExcel_Calculation_Function'));
54 }

References $result.

◆ testAutoloadValidPHPExcelClass()

AutoloaderTest::testAutoloadValidPHPExcelClass ( )

Definition at line 38 of file AutoloaderTest.php.

39 {
40 $className = 'PHPExcel_IOFactory';
41
43 // Check that class has been loaded
44 $this->assertTrue(class_exists($className));
45 }

References $result, and PHPExcel_Autoloader\Load().

+ Here is the call graph for this function:

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