Esempio n. 1
0
 public function testSingleWithLabel()
 {
     $checkbox = Former::checkbox('foo')->text('bar')->__toString();
     $matcher = $this->cg($this->cb('foo', 'Bar'));
     $this->assertEquals($matcher, $checkbox);
 }
Esempio n. 2
0
 public function testCustomUncheckedValue()
 {
     Former::config('push_checkboxes', true);
     Former::config('unchecked_value', 'unchecked');
     $checkbox = Former::checkbox('foo')->text('foo')->__toString();
     $matcher = $this->cg('<label for="foo" class="checkbox">' . '<input type="hidden" name="foo" value="unchecked" id="foo">' . $this->cb('foo') . 'Foo' . '</label>');
     $this->assertEquals($matcher, $checkbox);
     Former::config('push_checkboxes', false);
 }