public function testTypeRadioWithDifferentValue() { $input = new \Gajus\Dora\Input('test', ['type' => 'radio', 'value' => '2'], ['value' => 3]); $this->assertSame('<input name="test" type="radio" value="2">', $input->toString()); }
public function testDeriveInputName() { $input = new \Gajus\Dora\Input('foo[bar_tar_id][]'); $this->assertSame('Foo Bar Tar', $input->getProperty('name')); }
public function testCustomAttributeOutput() { $input = new \Gajus\Dora\Input('test', ['data-test' => 'foo']); $this->assertSame('<input data-test="foo" name="test" type="text" value="">', $input->toString()); }
public function testSetInputAttribute() { $input = new \Gajus\Dora\Input('test', ['data-foo' => 'bar']); $this->assertSame('bar', $input->getAttribute('data-foo')); }