CTextFilterTest::testFilterNl2br()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 9
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
cc 1
eloc 6
c 1
b 0
f 1
nc 1
nop 0
dl 0
loc 9
rs 9.6666
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