6 class CRM_Core_FormTest
extends CiviUnitTestCase
{
9 * Simulate opening various forms. All we're looking to do here is
10 * see if any warnings or notices come up, the equivalent of red boxes
11 * on the screen, but which are hidden when using popup forms.
12 * So no assertions required.
14 * @param string $classname
15 * @dataProvider formClassList
17 public function testOpeningForms(string $classname) {
18 $form = $this->getFormObject($classname);
20 $form->buildQuickForm();
21 $form->setDefaultValues();
22 $form->assign('action', CRM_Core_Action
::UPDATE
);
23 $form->getTemplate()->fetch($form->getTemplateFileName());
27 * Dataprovider for testOpeningForms().
28 * TODO: Add more forms! Use a descriptive array key so when it fails
29 * it will make it clearer what form it is, although you'll see the class
32 public function formClassList() {
34 'Add New Tag' => ['CRM_Tag_Form_Edit'],