Phalcon\Test\Unit\Tag\TagPasswordFieldTest::testPasswordFieldArrayParameterWithId PHP Method

testPasswordFieldArrayParameterWithId() public method

Tests passwordField with array as a parameters and id in it
Since: 2014-09-05
Author: Nikolaos Dimopoulos ([email protected])
    public function testPasswordFieldArrayParameterWithId()
    {
        $this->specify("passwordField with array parameter with id returns invalid HTML Strict", function () {
            $options = ['x_name', 'id' => 'x_id', 'class' => 'x_class', 'size' => '10'];
            $expected = '<input type="password" id="x_id" name="x_name" ' . 'class="x_class" size="10"';
            $this->tester->testFieldParameter('passwordField', $options, $expected, true);
        });
        $this->specify("passwordField with array parameter with id returns invalid HTML XHTML", function () {
            $options = ['x_name', 'id' => 'x_id', 'class' => 'x_class', 'size' => '10'];
            $expected = '<input type="password" id="x_id" name="x_name" ' . 'class="x_class" size="10"';
            $this->tester->testFieldParameter('passwordField', $options, $expected, true);
        });
    }