lithium\tests\cases\template\helper\FormTest::testCustomRadio PHP Method

testCustomRadio() public method

public testCustomRadio ( )
    public function testCustomRadio()
    {
        $result = $this->form->radio('foo', array('value' => '1'));
        $this->assertTags($result, array(array('input' => array('type' => 'radio', 'value' => '1', 'name' => 'foo', 'id' => 'Foo'))));
        $result = $this->form->radio('foo', array('checked' => true, 'value' => '1'));
        $this->assertTags($result, array(array('input' => array('type' => 'radio', 'value' => '1', 'name' => 'foo', 'checked' => 'checked', 'id' => 'Foo'))));
        $record = new Record(array('model' => $this->_model, 'data' => array('foo' => true)));
        $this->form->create($record);
        $result = $this->form->radio('foo', array('value' => '1'));
        $this->assertTags($result, array(array('input' => array('type' => 'radio', 'value' => '1', 'name' => 'foo', 'id' => 'MockFormPostFoo', 'checked' => 'checked'))));
        $result = $this->form->radio('foo', array('value' => true));
        $this->assertTags($result, array(array('input' => array('type' => 'radio', 'value' => '1', 'name' => 'foo', 'id' => 'MockFormPostFoo', 'checked' => 'checked'))));
    }
FormTest