Definition at line 6 of file CodePageTest.php.
◆ providerCodePage()
CodePageTest::providerCodePage |
( |
| ) |
|
◆ setUp()
Definition at line 9 of file CodePageTest.php.
10 {
11 if (!
defined(
'PHPEXCEL_ROOT')) {
12 define('PHPEXCEL_ROOT', APPLICATION_PATH . '/');
13 }
14 require_once(PHPEXCEL_ROOT . 'PHPExcel/Autoloader.php');
15 }
defined( 'APPLICATION_ENV')||define( 'APPLICATION_ENV'
References defined.
◆ testCodePageNumberToName()
CodePageTest::testCodePageNumberToName |
( |
| ) |
|
@dataProvider providerCodePage
Definition at line 20 of file CodePageTest.php.
21 {
22 $args = func_get_args();
23 $expectedResult = array_pop($args);
24 $result = call_user_func_array(array(
'PHPExcel_Shared_CodePage',
'NumberToName'),$args);
25 $this->assertEquals($expectedResult,
$result);
26 }
References $result.
◆ testNumberToNameWithInvalidCodePage()
CodePageTest::testNumberToNameWithInvalidCodePage |
( |
| ) |
|
Definition at line 33 of file CodePageTest.php.
34 {
35 $invalidCodePage = 12345;
36 try {
37 $result = call_user_func(array(
'PHPExcel_Shared_CodePage',
'NumberToName'),$invalidCodePage);
38 } catch (Exception $e) {
39 $this->assertEquals($e->getMessage(), 'Unknown codepage: 12345');
40 return;
41 }
42 $this->fail('An expected exception has not been raised.');
43 }
References $result.
◆ testNumberToNameWithUnsupportedCodePage()
CodePageTest::testNumberToNameWithUnsupportedCodePage |
( |
| ) |
|
Definition at line 45 of file CodePageTest.php.
46 {
47 $unsupportedCodePage = 720;
48 try {
49 $result = call_user_func(array(
'PHPExcel_Shared_CodePage',
'NumberToName'),$unsupportedCodePage);
50 } catch (Exception $e) {
51 $this->assertEquals($e->getMessage(), 'Code page 720 not supported.');
52 return;
53 }
54 $this->fail('An expected exception has not been raised.');
55 }
References $result.
The documentation for this class was generated from the following file:
- libs/composer/vendor/phpoffice/phpexcel/unitTests/Classes/PHPExcel/Shared/CodePageTest.php