Phalcon\Test\Unit\Tag\TagSubmitButtonTest::testSubmitButtonArrayParameterWithNameNoId PHP Method

testSubmitButtonArrayParameterWithNameNoId() public method

Tests submitButton with name and no id in parameter
Since: 2014-09-05
Author: Nikolaos Dimopoulos ([email protected])
    public function testSubmitButtonArrayParameterWithNameNoId()
    {
        $this->specify("submitButton 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="submit" name="x_other" ' . 'value="x_name" class="x_class" size="10"';
            $this->tester->testFieldParameter('submitButton', $options, $expected, false);
        });
        $this->specify("submitButton 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="submit" name="x_other" ' . 'value="x_name" class="x_class" size="10"';
            $this->tester->testFieldParameter('submitButton', $options, $expected, false);
        });
    }