Phalcon\Test\Unit\Tag\TagDateFieldTest::testDateFieldArrayParameterWithNameNoId PHP Method

testDateFieldArrayParameterWithNameNoId() public method

Tests dateField with name and no id in parameter
Since: 2014-09-05
Author: Nikolaos Dimopoulos ([email protected])
    public function testDateFieldArrayParameterWithNameNoId()
    {
        $this->specify("dateField with array parameter with name no id returns invalid HTML Strict", function () {
            $options = ['x_name', 'name' => 'x_other', 'class' => 'x_class', 'size' => '10'];
            $expected = '<input type="date" id="x_name" ' . 'name="x_other" class="x_class" size="10"';
            $this->tester->testFieldParameter('dateField', $options, $expected, false);
        });
        $this->specify("dateField with array parameter with name no id returns invalid HTML XHTML", function () {
            $options = ['x_name', 'name' => 'x_other', 'class' => 'x_class', 'size' => '10'];
            $expected = '<input type="date" id="x_name" ' . 'name="x_other" class="x_class" size="10"';
            $this->tester->testFieldParameter('dateField', $options, $expected, false);
        });
    }