public function testRemoveElements() { $e = new Element('text', 'username', 'Username'); $c = new Checkbox('colors', array('Red', 'Green', 'Blue')); $r = new Radio('colors', array('Red', 'Green', 'Blue')); $f = new Form('/submit', 'post'); $f->addElements(array($e, $c, $r)); $f->removeElement('username'); $f->removeElement('colors'); $this->assertEquals(1, count($f->getFields())); }