Code Duplication    Length = 12-13 lines in 3 locations

tests/PhpSpreadsheetTests/Cell/HyperlinkTest.php 3 locations

@@ 19-30 (lines=12) @@
16
        $this->assertEquals($urlValue, $result);
17
    }
18
19
    public function testSetUrl()
20
    {
21
        $initialUrlValue = 'http://www.phpexcel.net';
22
        $newUrlValue = 'http://github.com/PHPOffice/PhpSpreadsheet';
23
24
        $testInstance = new Hyperlink($initialUrlValue);
25
        $result = $testInstance->setUrl($newUrlValue);
26
        $this->assertTrue($result instanceof Hyperlink);
27
28
        $result = $testInstance->getUrl();
29
        $this->assertEquals($newUrlValue, $result);
30
    }
31
32
    public function testGetTooltip()
33
    {
@@ 42-53 (lines=12) @@
39
        $this->assertEquals($tooltipValue, $result);
40
    }
41
42
    public function testSetTooltip()
43
    {
44
        $initialTooltipValue = 'PhpSpreadsheet Web Site';
45
        $newTooltipValue = 'PhpSpreadsheet Repository on Github';
46
47
        $testInstance = new Hyperlink(null, $initialTooltipValue);
48
        $result = $testInstance->setTooltip($newTooltipValue);
49
        $this->assertTrue($result instanceof Hyperlink);
50
51
        $result = $testInstance->getTooltip();
52
        $this->assertEquals($newTooltipValue, $result);
53
    }
54
55
    public function testIsInternal()
56
    {
@@ 55-67 (lines=13) @@
52
        $this->assertEquals($newTooltipValue, $result);
53
    }
54
55
    public function testIsInternal()
56
    {
57
        $initialUrlValue = 'http://www.phpexcel.net';
58
        $newUrlValue = 'sheet://Worksheet1!A1';
59
60
        $testInstance = new Hyperlink($initialUrlValue);
61
        $result = $testInstance->isInternal();
62
        $this->assertFalse($result);
63
64
        $testInstance->setUrl($newUrlValue);
65
        $result = $testInstance->isInternal();
66
        $this->assertTrue($result);
67
    }
68
69
    public function testGetHashCode()
70
    {