Source

						public function testCustomValueCheckbox() {
		$result = $this->form->checkbox('foo', array('value' => 'HERO'));
		$this->assertTags($result, array(
			array('input' => array('type' => 'hidden', 'value' => '', 'name' => 'foo')),
			array('input' => array(
				'type' => 'checkbox', 'value' => 'HERO', 'name' => 'foo', 'id' => 'Foo'
			))
		));

		$result = $this->form->checkbox('foo', array('value' => 'nose'));
		$this->assertTags($result, array(
			array('input' => array('type' => 'hidden', 'value' => '', 'name' => 'foo')),
			array('input' => array(
				'type' => 'checkbox', 'value' => 'nose', 'name' => 'foo', 'id' => 'Foo'
			))
		));

		$record = new Record(array('model' => $this->_model, 'data' => array('foo' => 'nose')));
		$this->form->create($record);

		$result = $this->form->checkbox('foo', array('value' => 'nose'));
		$this->assertTags($result, array(
			array('input' => array('type' => 'hidden', 'value' => '', 'name' => 'foo')),
			array('input' => array(
				'type' => 'checkbox', 'value' => 'nose', 'name' => 'foo',
				'id' => 'MockFormPostFoo', 'checked' => 'checked'
			))
		));

		$record = new Record(array('model' => $this->_model, 'data' => array('foo' => 'foot')));
		$this->form->create($record);

		$result = $this->form->checkbox('foo', array('value' => 'nose'));
		$this->assertTags($result, array(
			array('input' => array('type' => 'hidden', 'value' => '', 'name' => 'foo')),
			array('input' => array(
				'type' => 'checkbox', 'value' => 'nose', 'name' => 'foo', 'id' => 'MockFormPostFoo'
			))
		));
	}