ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
FontTest Class Reference
+ Inheritance diagram for FontTest:
+ Collaboration diagram for FontTest:

Public Member Functions

 setUp ()
 
 testGetAutoSizeMethod ()
 
 testSetAutoSizeMethod ()
 
 testSetAutoSizeMethodWithInvalidValue ()
 
 testFontSizeToPixels ()
 @dataProvider providerFontSizeToPixels More...
 
 providerFontSizeToPixels ()
 
 testInchSizeToPixels ()
 @dataProvider providerInchSizeToPixels More...
 
 providerInchSizeToPixels ()
 
 testCentimeterSizeToPixels ()
 @dataProvider providerCentimeterSizeToPixels More...
 
 providerCentimeterSizeToPixels ()
 

Detailed Description

Definition at line 6 of file FontTest.php.

Member Function Documentation

◆ providerCentimeterSizeToPixels()

FontTest::providerCentimeterSizeToPixels ( )

Definition at line 89 of file FontTest.php.

90 {
91 return new testDataFileIterator('rawTestData/Shared/CentimeterSizeToPixels.data');
92 }

◆ providerFontSizeToPixels()

FontTest::providerFontSizeToPixels ( )

Definition at line 57 of file FontTest.php.

58 {
59 return new testDataFileIterator('rawTestData/Shared/FontSizeToPixels.data');
60 }

◆ providerInchSizeToPixels()

FontTest::providerInchSizeToPixels ( )

Definition at line 73 of file FontTest.php.

74 {
75 return new testDataFileIterator('rawTestData/Shared/InchSizeToPixels.data');
76 }

◆ setUp()

FontTest::setUp ( )

Definition at line 9 of file FontTest.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'
Definition: bootstrap.php:27

References defined.

◆ testCentimeterSizeToPixels()

FontTest::testCentimeterSizeToPixels ( )

@dataProvider providerCentimeterSizeToPixels

Definition at line 81 of file FontTest.php.

82 {
83 $args = func_get_args();
84 $expectedResult = array_pop($args);
85 $result = call_user_func_array(array('PHPExcel_Shared_Font','centimeterSizeToPixels'),$args);
86 $this->assertEquals($expectedResult, $result);
87 }
$result

References $result.

◆ testFontSizeToPixels()

FontTest::testFontSizeToPixels ( )

@dataProvider providerFontSizeToPixels

Definition at line 49 of file FontTest.php.

50 {
51 $args = func_get_args();
52 $expectedResult = array_pop($args);
53 $result = call_user_func_array(array('PHPExcel_Shared_Font','fontSizeToPixels'),$args);
54 $this->assertEquals($expectedResult, $result);
55 }

References $result.

◆ testGetAutoSizeMethod()

FontTest::testGetAutoSizeMethod ( )

Definition at line 17 of file FontTest.php.

18 {
20
21 $result = call_user_func(array('PHPExcel_Shared_Font','getAutoSizeMethod'));
22 $this->assertEquals($expectedResult, $result);
23 }
const AUTOSIZE_METHOD_APPROX
Definition: Font.php:39

References $result, and PHPExcel_Shared_Font\AUTOSIZE_METHOD_APPROX.

◆ testInchSizeToPixels()

FontTest::testInchSizeToPixels ( )

@dataProvider providerInchSizeToPixels

Definition at line 65 of file FontTest.php.

66 {
67 $args = func_get_args();
68 $expectedResult = array_pop($args);
69 $result = call_user_func_array(array('PHPExcel_Shared_Font','inchSizeToPixels'),$args);
70 $this->assertEquals($expectedResult, $result);
71 }

References $result.

◆ testSetAutoSizeMethod()

FontTest::testSetAutoSizeMethod ( )

Definition at line 25 of file FontTest.php.

26 {
27 $autosizeMethodValues = array(
30 );
31
32 foreach($autosizeMethodValues as $autosizeMethodValue) {
33 $result = call_user_func(array('PHPExcel_Shared_Font','setAutoSizeMethod'),$autosizeMethodValue);
34 $this->assertTrue($result);
35 }
36 }
const AUTOSIZE_METHOD_EXACT
Definition: Font.php:40

References $result, PHPExcel_Shared_Font\AUTOSIZE_METHOD_APPROX, and PHPExcel_Shared_Font\AUTOSIZE_METHOD_EXACT.

◆ testSetAutoSizeMethodWithInvalidValue()

FontTest::testSetAutoSizeMethodWithInvalidValue ( )

Definition at line 38 of file FontTest.php.

39 {
40 $unsupportedAutosizeMethod = 'guess';
41
42 $result = call_user_func(array('PHPExcel_Shared_Font','setAutoSizeMethod'),$unsupportedAutosizeMethod);
43 $this->assertFalse($result);
44 }

References $result.


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