PluginProbe
Visualizer – Tables & Charts Manager with Built-in AI Generator / 2.2.0
Visualizer – Tables & Charts Manager with Built-in AI Generator v2.2.0
4.0.8 4.0.7 4.0.6 4.0.5 4.0.4 4.0.3 3.0.5 3.0.6 3.0.7 3.0.8 3.0.9 3.1.0 3.1.1 3.1.2 3.1.3 3.10.0 3.10.1 3.10.10 3.10.11 3.10.12 3.10.13 3.10.14 3.10.15 3.10.2 3.10.3 All 149 releases
visualizer / vendor / phpoffice / phpexcel / unitTests / Classes / PHPExcel / AutoloaderTest.php

AutoloaderTest.php in Visualizer – Tables & Charts Manager with Built-in AI Generator 2.2.0, at vendor/phpoffice/phpexcel/unitTests/Classes/PHPExcel/AutoloaderTest.php

56 lines 1.5 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3
4 class AutoloaderTest extends PHPUnit_Framework_TestCase
5 {
6
7 public function setUp()
8 {
9 if (!defined('PHPEXCEL_ROOT'))
10 {
11 define('PHPEXCEL_ROOT', APPLICATION_PATH . '/');
12 }
13 require_once(PHPEXCEL_ROOT . 'PHPExcel/Autoloader.php');
14 }
15
16 public function testAutoloaderNonPHPExcelClass()
17 {
18 $className = 'InvalidClass';
19
20 $result = PHPExcel_Autoloader::Load($className);
21 // Must return a boolean...
22 $this->assertTrue(is_bool($result));
23 // ... indicating failure
24 $this->assertFalse($result);
25 }
26
27 public function testAutoloaderInvalidPHPExcelClass()
28 {
29 $className = 'PHPExcel_Invalid_Class';
30
31 $result = PHPExcel_Autoloader::Load($className);
32 // Must return a boolean...
33 $this->assertTrue(is_bool($result));
34 // ... indicating failure
35 $this->assertFalse($result);
36 }
37
38 public function testAutoloadValidPHPExcelClass()
39 {
40 $className = 'PHPExcel_IOFactory';
41
42 $result = PHPExcel_Autoloader::Load($className);
43 // Check that class has been loaded
44 $this->assertTrue(class_exists($className));
45 }
46
47 public function testAutoloadInstantiateSuccess()
48 {
49 $result = new PHPExcel_Calculation_Function(1,2,3);
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 }
55
56 }