public function testConstructorSetFields() { $fields = array('username' => array('type' => 'text', 'value' => 'Username here...', 'label' => 'Username:'******'required' => true, 'attributes' => array('size' => 40))); $f = new Form('/submit', 'post', $fields); $f->setErrorDisplay('h3', array('class' => 'error-class'), true); $this->assertEquals(1, count($f->getFields())); }