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

Public Member Functions

 setUp ()
 
 testGetAutoSizeMethod ()
 
 testSetAutoSizeMethod ()
 
 testSetAutoSizeMethodWithInvalidValue ()
 
 testFontSizeToPixels ()
 providerFontSizeToPixels More...
 
 providerFontSizeToPixels ()
 
 testInchSizeToPixels ()
 providerInchSizeToPixels More...
 
 providerInchSizeToPixels ()
 
 testCentimeterSizeToPixels ()
 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.

References defined.

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

◆ testCentimeterSizeToPixels()

FontTest::testCentimeterSizeToPixels ( )

providerCentimeterSizeToPixels

Definition at line 81 of file FontTest.php.

References $result, and array.

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
Create styles array
The data for the language used.

◆ testFontSizeToPixels()

FontTest::testFontSizeToPixels ( )

providerFontSizeToPixels

Definition at line 49 of file FontTest.php.

References $result, and array.

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  }
$result
Create styles array
The data for the language used.

◆ testGetAutoSizeMethod()

FontTest::testGetAutoSizeMethod ( )

Definition at line 17 of file FontTest.php.

References $result, array, and PHPExcel_Shared_Font\AUTOSIZE_METHOD_APPROX.

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
$result
Create styles array
The data for the language used.

◆ testInchSizeToPixels()

FontTest::testInchSizeToPixels ( )

providerInchSizeToPixels

Definition at line 65 of file FontTest.php.

References $result, and array.

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  }
$result
Create styles array
The data for the language used.

◆ testSetAutoSizeMethod()

FontTest::testSetAutoSizeMethod ( )

Definition at line 25 of file FontTest.php.

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

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_APPROX
Definition: Font.php:39
$result
const AUTOSIZE_METHOD_EXACT
Definition: Font.php:40
Create styles array
The data for the language used.

◆ testSetAutoSizeMethodWithInvalidValue()

FontTest::testSetAutoSizeMethodWithInvalidValue ( )

Definition at line 38 of file FontTest.php.

References $result, and array.

39  {
40  $unsupportedAutosizeMethod = 'guess';
41 
42  $result = call_user_func(array('PHPExcel_Shared_Font','setAutoSizeMethod'),$unsupportedAutosizeMethod);
43  $this->assertFalse($result);
44  }
$result
Create styles array
The data for the language used.

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