public function testMakeView() { $this->type_handler->addType('mock_type', $this->createMockTypeWithMockMethod('makeView', 'make_view')); $mock_form_handler = $this->getMockBuilder('AV\\Form\\FormHandler')->disableOriginalConstructor()->getMock(); $this->assertEquals('make_view', $this->type_handler->makeView(array('type' => 'mock_type'), array(), $mock_form_handler)); }
/** * Process a field and return it * * @param $fieldName * @return bool */ public function getProcessedField($fieldName) { if (!isset($this->fields[$fieldName])) { return false; } $field = $this->fields[$fieldName]; $field['has_error'] = $this->fieldHasError($fieldName); return $this->typeHandler->makeView($field, $this->data, $this); }