StringTagAppendarTest   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
c 1
b 0
f 0
lcom 0
cbo 2
dl 0
loc 18
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A appendAroundTest() 0 12 1
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