Phalcon\Test\Unit\Tag\TagTelFieldTest::testTelFieldWithDisplayToElementNotPresent PHP Method

testTelFieldWithDisplayToElementNotPresent() public method

Tests telField with displayTo and element not present
Since: 2014-09-05
Author: Nikolaos Dimopoulos ([email protected])
    public function testTelFieldWithDisplayToElementNotPresent()
    {
        $this->specify("telField 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="tel" id="x_name" ' . 'name="x_other" value="x_value" class="x_class" ' . 'size="10"';
            $this->tester->testFieldParameter('telField', $options, $expected, false, 'displayTo');
        });
        $this->specify("telField 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="tel" id="x_name" ' . 'name="x_other" value="x_value" class="x_class" ' . 'size="10"';
            $this->tester->testFieldParameter('telField', $options, $expected, true, 'displayTo');
        });
    }