Completed
Push — master ( 3a35d5...02819f )
by Gabriel
08:58
created

testAutoSelectFirstDefaultDoesNotChangeValue()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 12

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 12
rs 9.8666
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
namespace Nip\Form\Tests\Elements;
4
5
use Nip\Form\Tests\AbstractTest;
6
7
/**
8
 * Class RadioGroupTest
9
 * @package Nip\Form\Tests\Elements
10
 */
11
class RadioGroupTest extends AbstractTest
12
{
13
    public function testRenderEmptyElement()
14
    {
15
        $input = new \Nip_Form_Element_RadioGroup(new \Nip\Form\Form());
16
        $html = $input->render();
17
18
        self::assertSame('', $html);
19
    }
20
21
    public function testAutoSelectFirstDefaultDoesNotChangeValue()
22
    {
23
        $input = new \Nip_Form_Element_RadioGroup(new \Nip\Form\Form());
24
        $input->addOption('123', 'Age');
25
        $input->addOption('789', 'Height');
26
        $input->autoSelectFirst(true);
27
28
        self::assertSame(null, $input->getValue());
29
30
        $input->render();
31
        self::assertSame(null, $input->getValue());
32
    }
33
}
34