From: eileen Date: Wed, 4 Sep 2019 21:58:59 +0000 (+1200) Subject: Improve tests on loading relationship data X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=e0d2e4672ad9bc136a9908a07f19c2b47418d6ef;p=civicrm-core.git Improve tests on loading relationship data --- diff --git a/tests/phpunit/CRM/Contact/Import/Form/MapFieldTest.php b/tests/phpunit/CRM/Contact/Import/Form/MapFieldTest.php index b85ad00dc6..50ebd39fcb 100644 --- a/tests/phpunit/CRM/Contact/Import/Form/MapFieldTest.php +++ b/tests/phpunit/CRM/Contact/Import/Form/MapFieldTest.php @@ -310,10 +310,14 @@ document.forms.MapField['mapper[0][3]'].style.display = 'none';\n", ], [ // Yes, the relationship mapping really does use url whereas non relationship uses website because... legacy - ['name' => 'Url', 'contact_type' => 'Individual', 'column_number' => 0, 'website_type_id', 'relationship_type_id' => 1, 'relationship_direction' => 'a_b'], - "document.forms.MapField['mapper[0][2]'].style.display = 'none'; -document.forms.MapField['mapper[0][3]'].style.display = 'none';\n", - ['mapper[0]' => ['1_a_b', 'url', 0, NULL]], + ['name' => 'Url', 'contact_type' => 'Individual', 'column_number' => 0, 'website_type_id' => 1, 'relationship_type_id' => 1, 'relationship_direction' => 'a_b'], + "document.forms.MapField['mapper[0][3]'].style.display = 'none';\n", + ['mapper[0]' => ['1_a_b', 'url', 1]], + ], + [ + ['name' => 'Phone', 'contact_type' => 'Individual', 'column_number' => 0, 'phone_type_id' => 1, 'relationship_type_id' => 1, 'relationship_direction' => 'b_a'], + '', + ['mapper[0]' => ['1_b_a', 'phone', 'Primary', 1]], ], ]; }