BootstrapUI\Test\TestCase\View\Helper\FormHelperTest::testRadioInputCustomTemplate PHP Метод

testRadioInputCustomTemplate() публичный Метод

https://github.com/FriendsOfCake/bootstrap-ui/pull/113
public testRadioInputCustomTemplate ( ) : void
Результат void
    public function testRadioInputCustomTemplate()
    {
        $templates = ['radioNestingLabel' => '<div class="radio custom-class">{{hidden}}<label{{attrs}}>{{input}}{{text}}</label></div>'];
        $this->Form->create($this->article);
        $result = $this->Form->input('published', ['type' => 'radio', 'options' => ['Yes', 'No'], 'templates' => $templates]);
        $expected = [['div' => ['class' => 'form-group radio']], ['label' => true], 'Published', '/label', ['input' => ['type' => 'hidden', 'name' => 'published', 'value' => '']], ['div' => ['class' => 'radio custom-class']], ['label' => ['for' => 'published-0']], ['input' => ['type' => 'radio', 'name' => 'published', 'value' => 0, 'id' => 'published-0']], 'Yes', '/label', '/div', ['div' => ['class' => 'radio custom-class']], ['label' => ['for' => 'published-1']], ['input' => ['type' => 'radio', 'name' => 'published', 'value' => 1, 'id' => 'published-1']], 'No', '/label', '/div', '/div'];
        $this->assertHtml($expected, $result);
    }