Helper\Unit::testFieldParameter PHP Method

testFieldParameter() public method

Runs the test for a Tag::$function with $options
public testFieldParameter ( string $function, mixed $options, string $expected, boolean $xhtml, string $set = '' )
$function string
$options mixed
$expected string
$xhtml boolean
$set string
    public function testFieldParameter($function, $options, $expected, $xhtml, $set = '')
    {
        Tag::resetInput();
        if ($xhtml) {
            Tag::setDocType(Tag::XHTML10_STRICT);
            $expected .= ' />';
        } else {
            Tag::setDocType(Tag::HTML5);
            $expected .= '>';
        }
        if ($set) {
            Tag::displayTo('x_name', 'x_value');
        }
        $actual = Tag::$function($options);
        if ($set) {
            Tag::$set('x_name', '');
        }
        $this->assertEquals($expected, $actual);
    }