CTextFilterTest   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A testFilterNl2br() 0 9 1
1
<?php
2
3
namespace Anax\Content;
4
5
/**
6
 * Tests.
7
 *
8
 */
9
class CTextFilterTest extends \PHPUnit_Framework_TestCase
10
{
11
12
    /**
13
     * Test 
14
     *
15
     * @return void
16
     *
17
     *
18
     */
19
    public function testFilterNl2br()
20
    {
21
        $tf = new \Anax\Content\CTextFilter();
22
23
        $html = "hi\nhi";
24
        $expected = "hi<br />\nhi";
25
        $res = $tf->doFilter($html, 'nl2br');
26
        $this->assertEquals($expected, $res, "Filter nl2bt failed.");
27
    }
28
}
29