StringTagAppendarTest::appendAroundTest()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 12
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 12
rs 9.4285
cc 1
eloc 6
nc 1
nop 0
1
<?php
2
3
namespace HtmlTagAppendar\Tests;
4
5
use HtmlTagAppendar\StringTagAppendar;
6
7
class StringTagAppendarTest extends \PHPUnit_Framework_TestCase {
8
    
9
    /**
10
     * @test
11
     */
12
    public function appendAroundTest()
13
    {
14
        $stringTagAppendar = new StringTagAppendar();
15
        
16
        $content = "This content has some dummy text. I want to highlight dummy text with bold tag.";        
17
        
18
        $actualResult = $stringTagAppendar->appendAround($content, "dummy", "<b>");        
19
        
20
        $expectedResult = "This content has some <b>dummy</b> text. I want to highlight <b>dummy</b> text with bold tag.";
21
        
22
        $this->assertEquals($expectedResult, $actualResult);
23
    }
24
}
25