Phalcon\Test\Unit\Tag\TagSearchFieldTest::testSearchFieldArrayParameterWithId PHP Méthode

testSearchFieldArrayParameterWithId() public méthode

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