Phalcon\Test\Unit\Tag\TagTextAreaTest::testTextAreaWithDisplayToAndNewlineInValue PHP Method

testTextAreaWithDisplayToAndNewlineInValue() public method

Tests textArea with displayTo and newline in value
Since: 2014-10-03
Author: Nikolaos Dimopoulos ([email protected])
    public function testTextAreaWithDisplayToAndNewlineInValue()
    {
        $this->specify("textArea with displayTo and newline in value", function () {
            $options = 'x_name';
            $value = "\r\nx_content";
            $expected = '<textarea id="x_name" name="x_name">' . $value . '</textarea>';
            Tag::setDefault('x_name', $value);
            $actual = Tag::textArea($options);
            Tag::setDefault('x_name', '');
            expect($actual)->equals($expected);
        });
    }