Phalcon\Test\Unit\Tag\TagColorFieldTest::testColorFieldArrayParameter PHP Method

testColorFieldArrayParameter() public method

Tests colorField with array as a parameter
Since: 2014-09-05
Author: Nikolaos Dimopoulos ([email protected])
    public function testColorFieldArrayParameter()
    {
        $this->specify("colorField with array parameter returns invalid HTML Strict", function () {
            $options = ['x_name', 'class' => 'x_class'];
            $expected = '<input type="color" id="x_name" name="x_name" ' . 'class="x_class"';
            $this->tester->testFieldParameter('colorField', $options, $expected, false);
        });
        $this->specify("colorField with array parameter returns invalid HTML XHTML", function () {
            $options = ['x_name', 'class' => 'x_class'];
            $expected = '<input type="color" id="x_name" name="x_name" ' . 'class="x_class"';
            $this->tester->testFieldParameter('colorField', $options, $expected, true);
        });
    }