Consolidate handling of conflicts between the batch job and get_conflicts api
authoreileen <emcnaughton@wikimedia.org>
Mon, 1 Jul 2019 02:56:08 +0000 (14:56 +1200)
committereileen <emcnaughton@wikimedia.org>
Mon, 1 Jul 2019 22:09:04 +0000 (10:09 +1200)
commitffa59d181fdfc9f5ebcbe0320bcf7ee03a08b208
treebe44ee54800090c5dde06805983e46244f9d6aed
parent5214f03bbc28ffb57c683660637ebfea5a0ea7e4
Consolidate handling of conflicts between the batch job and get_conflicts api

This ensures that conflicts are stored during batch_merge to the prev_next cache with the same format as when the api
calls get_conflicts. The code doing this wrangling is moved from the api to the BAO layer.

We add a test to ensure the output is the same & use the previously added test to check the string is the same too.

Test cover here is pretty good
CRM/Core/BAO/PrevNextCache.php
CRM/Dedupe/Merger.php
api/v3/Contact.php
tests/phpunit/api/v3/ContactTest.php
tests/phpunit/api/v3/JobTest.php