HtmlTest::testCleanPostForTextArea PHP 메소드

testCleanPostForTextArea() 공개 메소드

    public function testCleanPostForTextArea()
    {
        $origin = "A text that \\\"would\\\" be entered in a \\'textarea\\'\\nWith breakline\\r\\nand breaklines.";
        $expected = "A text that \"would\" be entered in a 'textarea'\nWith breakline\nand breaklines.";
        $this->assertEquals($expected, Html::cleanPostForTextArea($origin));
        $aorigin = [$origin, "Another\\none!"];
        $aexpected = [$expected, "Another\none!"];
        $this->assertEquals($aexpected, Html::cleanPostForTextArea($aorigin));
    }