Phalcon\Test\Unit\Tag\TagSelectStaticTest::testSelectStaticStringParameter PHP Method

testSelectStaticStringParameter() public method

Tests selectStatic with string as a parameter
Since: 2014-09-05
Author: Nikolaos Dimopoulos ([email protected])
    public function testSelectStaticStringParameter()
    {
        $this->specify("selectStatic with string parameter returns invalid HTML", function () {
            Tag::resetInput();
            $name = 'x_name';
            $options = ['A' => 'Active', 'I' => 'Inactive'];
            $expected = '<select id="x_name" name="x_name">' . PHP_EOL . chr(9) . '<option value="A">Active</option>' . PHP_EOL . chr(9) . '<option value="I">Inactive</option>' . PHP_EOL . '</select>';
            $actual = Tag::selectStatic($name, $options);
            Tag::resetInput();
            expect($actual)->equals($expected);
        });
    }