public function testCanGetInput() { $args = array('action' => 'http://google.com', 'method' => 'GET', 'id' => 'my_id', 'name' => 'some_name', 'class' => array('form-class')); $form = new Form("default", $args); $input_args = array('field_type' => 'meta_key', 'format' => 'checkbox', 'values' => array('one', 'two')); $input = new Input("myinput", $input_args); $form->addInput($input); $inputs = $form->getInputs(); $this->assertTrue(is_array($inputs) && count($inputs) == 1); $this->assertTrue($inputs[0] instanceof Input); $this->assertTrue($inputs[0]->getInputName() == "myinput"); }