From e0d2e4672ad9bc136a9908a07f19c2b47418d6ef Mon Sep 17 00:00:00 2001 From: eileen Date: Thu, 5 Sep 2019 09:58:59 +1200 Subject: [PATCH] Improve tests on loading relationship data --- .../phpunit/CRM/Contact/Import/Form/MapFieldTest.php | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) 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]], ], ]; } -- 2.25.1