From e50cc847749d14ac85639767db61d2f82e5f4721 Mon Sep 17 00:00:00 2001 From: demeritcowboy Date: Tue, 14 Jul 2020 15:29:12 -0400 Subject: [PATCH] test for new Individual form --- .../CRM/Contact/Form/IndividualTest.php | 39 +++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 tests/phpunit/CRM/Contact/Form/IndividualTest.php 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('