HighLighterTest::HighLightTest()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 0 Features 1
Metric Value
c 2
b 0
f 1
dl 0
loc 7
rs 9.4285
cc 1
eloc 5
nc 1
nop 0
1
<?php
2
3
namespace LinkEmailHighLighter\Tests;
4
5
use LinkEmailHighLighter\HighLighter;
6
7
class HighLighterTest extends \PHPUnit_Framework_TestCase{
8
    
9
    /**
10
     * @test
11
     */
12
    public function HighLightTest()
13
    {
14
        $highlighter = new HighLighter('');
15
        $output = $highlighter->HighLight('Lorem Ipsum http://www.google.co.in lorem ipsum dummy text added for the testing purpose by [email protected]');
16
        $expectedOutPut = 'Lorem Ipsum <a href="http://www.google.co.in" target="_blank">http://www.google.co.in</a> lorem ipsum dummy text added for the testing purpose by <a href="mailto:[email protected]">[email protected]</a>';
17
        $this->assertEquals($expectedOutPut, $output);
18
    }
19
}
20