From: demeritcowboy Date: Tue, 14 Jul 2020 19:29:12 +0000 (-0400) Subject: test for new Individual form X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=e50cc847749d14ac85639767db61d2f82e5f4721;p=civicrm-core.git test for new Individual form --- diff --git a/tests/phpunit/CRM/Contact/Form/IndividualTest.php b/tests/phpunit/CRM/Contact/Form/IndividualTest.php new file mode 100644 index 0000000000..fbe851b0cf --- /dev/null +++ b/tests/phpunit/CRM/Contact/Form/IndividualTest.php @@ -0,0 +1,39 @@ +controller = new CRM_Core_Controller_Simple('CRM_Contact_Form_Contact', 'New Individual'); + + $form->set('reset', '1'); + $form->set('ct', 'Individual'); + + ob_start(); + $form->controller->_actions['display']->perform($form, 'display'); + $contents = ob_get_contents(); + ob_end_clean(); + print_r($contents); + + // There's a bunch of other stuff we could check for in $contents, but then + // it's tied to the html output and has the same maintenance problems + // as webtests. Mostly what we're doing in this test is checking that it + // doesn't generate any E_NOTICES/WARNINGS or other errors. But let's do + // one check. + $this->assertStringContainsString('