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

testPasswordFieldWithDisplayToElementNotPresent() public method

Tests passwordField with displayTo and element not present
Since: 2014-09-05
Author: Nikolaos Dimopoulos ([email protected])
    public function testPasswordFieldWithDisplayToElementNotPresent()
    {
        $this->specify("passwordField with displayTo and element not present returns invalid HTML Strict", function () {
            $options = ['x_name', 'name' => 'x_other', 'class' => 'x_class', 'size' => '10'];
            $expected = '<input type="password" id="x_name" ' . 'name="x_other" value="x_value" class="x_class" ' . 'size="10"';
            $this->tester->testFieldParameter('passwordField', $options, $expected, false, 'displayTo');
        });
        $this->specify("passwordField with displayTo and element not present returns invalid HTML XHTML", function () {
            $options = ['x_name', 'name' => 'x_other', 'class' => 'x_class', 'size' => '10'];
            $expected = '<input type="password" id="x_name" ' . 'name="x_other" value="x_value" class="x_class" ' . 'size="10"';
            $this->tester->testFieldParameter('passwordField', $options, $expected, true, 'displayTo');
        });
    }