Phalcon\Test\Unit\Tag\TagNumericFieldTest::testNumericFieldWithSetDefault PHP Method

testNumericFieldWithSetDefault() public method

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