Phalcon\Test\Unit\Forms\Element\TextTest::testCreatingTextElementWithNameSimilarToTheFormMethods PHP Method

testCreatingTextElementWithNameSimilarToTheFormMethods() public method

Tests Text::render
Since: 2016-07-17
Author: Serghei Iakovlev ([email protected])
    public function testCreatingTextElementWithNameSimilarToTheFormMethods()
    {
        $this->specify('Text::render does not return expected result', function ($name) {
            $element = new Text($name);
            expect($element->getName())->equals($name);
            expect($element->render())->equals(sprintf('<input type="text" id="%s" name="%s" />', $name, $name));
            expect($element->getValue())->null();
        }, ['examples' => $this->nameLikeFormMethodsProvider()]);
    }