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

Public Member Functions

 setUp ()
 
 testGetUrl ()
 
 testSetUrl ()
 
 testGetTooltip ()
 
 testSetTooltip ()
 
 testIsInternal ()
 
 testGetHashCode ()
 

Detailed Description

Definition at line 4 of file HyperlinkTest.php.

Member Function Documentation

◆ setUp()

HyperlinkTest::setUp ( )

Definition at line 7 of file HyperlinkTest.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.

◆ testGetHashCode()

HyperlinkTest::testGetHashCode ( )

Definition at line 76 of file HyperlinkTest.php.

77 {
78 $urlValue = 'http://www.phpexcel.net';
79 $tooltipValue = 'PHPExcel Web Site';
80 $initialExpectedHash = 'd84d713aed1dbbc8a7c5af183d6c7dbb';
81
82 $testInstance = new PHPExcel_Cell_Hyperlink($urlValue, $tooltipValue);
83
84 $result = $testInstance->getHashCode();
85 $this->assertEquals($initialExpectedHash,$result);
86 }
$result

References $result.

◆ testGetTooltip()

HyperlinkTest::testGetTooltip ( )

Definition at line 39 of file HyperlinkTest.php.

40 {
41 $tooltipValue = 'PHPExcel Web Site';
42
43 $testInstance = new PHPExcel_Cell_Hyperlink(NULL, $tooltipValue);
44
45 $result = $testInstance->getTooltip();
46 $this->assertEquals($tooltipValue,$result);
47 }

References $result.

◆ testGetUrl()

HyperlinkTest::testGetUrl ( )

Definition at line 16 of file HyperlinkTest.php.

17 {
18 $urlValue = 'http://www.phpexcel.net';
19
20 $testInstance = new PHPExcel_Cell_Hyperlink($urlValue);
21
22 $result = $testInstance->getUrl();
23 $this->assertEquals($urlValue,$result);
24 }

References $result.

◆ testIsInternal()

HyperlinkTest::testIsInternal ( )

Definition at line 62 of file HyperlinkTest.php.

63 {
64 $initialUrlValue = 'http://www.phpexcel.net';
65 $newUrlValue = 'sheet://Worksheet1!A1';
66
67 $testInstance = new PHPExcel_Cell_Hyperlink($initialUrlValue);
68 $result = $testInstance->isInternal();
69 $this->assertFalse($result);
70
71 $testInstance->setUrl($newUrlValue);
72 $result = $testInstance->isInternal();
73 $this->assertTrue($result);
74 }

References $result.

◆ testSetTooltip()

HyperlinkTest::testSetTooltip ( )

Definition at line 49 of file HyperlinkTest.php.

50 {
51 $initialTooltipValue = 'PHPExcel Web Site';
52 $newTooltipValue = 'PHPExcel Repository on Github';
53
54 $testInstance = new PHPExcel_Cell_Hyperlink(NULL, $initialTooltipValue);
55 $result = $testInstance->setTooltip($newTooltipValue);
56 $this->assertTrue($result instanceof PHPExcel_Cell_Hyperlink);
57
58 $result = $testInstance->getTooltip();
59 $this->assertEquals($newTooltipValue,$result);
60 }

References $result.

◆ testSetUrl()

HyperlinkTest::testSetUrl ( )

Definition at line 26 of file HyperlinkTest.php.

27 {
28 $initialUrlValue = 'http://www.phpexcel.net';
29 $newUrlValue = 'http://github.com/PHPOffice/PHPExcel';
30
31 $testInstance = new PHPExcel_Cell_Hyperlink($initialUrlValue);
32 $result = $testInstance->setUrl($newUrlValue);
33 $this->assertTrue($result instanceof PHPExcel_Cell_Hyperlink);
34
35 $result = $testInstance->getUrl();
36 $this->assertEquals($newUrlValue,$result);
37 }

References $result.


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