public function testRemoveArrayOfElements() { $fields = array(array('username' => array('type' => 'text', 'value' => 'Username here...', 'label' => 'Username:'******'required' => true, 'attributes' => array('size' => 40))), array('email1' => array('type' => 'text', 'label' => 'Email 1:', 'required' => true, 'attributes' => array('size' => 40)), 'email2' => array('type' => 'text', 'label' => 'Email 1:', 'required' => true, 'attributes' => array('size' => 40)))); $f = new Form('/submit', 'post'); $f->addFields($fields); $f->removeElement('username'); $this->assertEquals(2, count($f->getFields())); }