Source

						public function testFormDataBinding() {
		try {
			MockFormPost::config(array('connection' => false));
		} catch (Exception $e) {
			MockFormPost::config(array('connection' => false));
		}

		$record = new Record(array('model' => $this->_model, 'data' => array(
			'id' => '5',
			'author_id' => '2',
			'title' => 'This is a saved post',
			'body' => 'This is the body of the saved post'
		)));

		$result = $this->form->create($record);
		$this->assertTags($result, array(
			'form' => array('action' => "{$this->base}posts", 'method' => 'post')
		));

		$result = $this->form->text('title');
		$this->assertTags($result, array('input' => array(
			'type' => 'text', 'name' => 'title',
			'value' => 'This is a saved post', 'id' => 'MockFormPostTitle'
		)));

		$this->assertEqual('</form>', $this->form->end());

		$this->assertTags($this->form->text('title'), array('input' => array(
			'type' => 'text', 'name' => 'title', 'id' => 'Title'
		)));
	}