improves LX-Office import test
authorPhilipp Schüle <p.schuele@metaways.de>
Thu, 5 Jun 2014 12:05:12 +0000 (14:05 +0200)
committerPhilipp Schüle <p.schuele@metaways.de>
Thu, 5 Jun 2014 19:43:44 +0000 (21:43 +0200)
Change-Id: Id0687be2c00853ebb8b48cbef587e9d9775677e8
Reviewed-on: http://gerrit.tine20.com/customers/735
Tested-by: Jenkins CI (http://ci.tine20.com/)
Reviewed-by: Philipp Schüle <p.schuele@metaways.de>
tests/tine20/Addressbook/Import/CsvTest.php
tests/tine20/Addressbook/Import/files/importtest_lxoffice2.csv

index 87d1b41..cbf247e 100644 (file)
@@ -357,7 +357,6 @@ class Addressbook_Import_CsvTest extends PHPUnit_Framework_TestCase
         
         // add duplicate field "customernumber"
         Addressbook_Controller_Contact::getInstance()->duplicateCheckFields(array(
-            array('n_given', 'n_family', 'org_name'),
             array('email'),
             array('customernumber')
         ));
@@ -383,13 +382,15 @@ class Addressbook_Import_CsvTest extends PHPUnit_Framework_TestCase
         
         $result = $this->_doImport($options, $definition);
         
-        $this->assertEquals(4, count($result['results']));
+        $this->assertEquals(6, count($result['results']));
         $this->assertEquals(3, $result['updatecount'], 'should have updated 3 contacts');
-        $this->assertEquals(1, $result['totalcount'], 'should have added 1 contact');
+        $this->assertEquals(3, $result['totalcount'], 'should have added 3 contacts');
         $this->assertEquals('Straßbough', $result['results'][1]['adr_one_locality'],
                 'should have changed the locality of contact #2: ' . print_r($result['results'][1]->toArray(), true));
         $this->assertEquals('Dr. Schutheiss', $result['results'][3]['n_family']);
         $this->assertEquals(1, $result['results'][2]['seq'], 'Wolfer should not be updated - nothing changed');
         $this->assertEquals('Weixdorf DD', $result['results'][0]['adr_one_locality'], 'locality should persist');
+        $this->assertEquals('Gartencenter Röhr & Vater', $result['results'][4]['n_fileas']);
+        $this->assertEquals('Straßback', $result['results'][5]['adr_one_locality']);
     }
 }
index 9e568ba..87e006e 100644 (file)
@@ -2,4 +2,6 @@ customernumber,greeting,name,department_1,street,country,zipcode,city,phone,fax,
 "73029","Wolfgang","Berger","","Heuerstraße 2","D","11108","","12345","","",,,,,,,,,,
 "72810",,"Nitsch","","Heuerstraße 16","D","22222","Straßbough","12345","","",,,,,,,,,,
 "72911",,"Wolfer","","Heuerstraße 44","D","11558","Großenhain","","","",,,,,,,,,,
-"73222",,"Dr. Schutheiss","","Heuerstraße 4","D","11120","Magdeburg","1233453","","",,,,,,,,,,
\ No newline at end of file
+"73222",,"Dr. Schutheiss","","Heuerstraße 4","D","11120","Magdeburg","1233453","","",,,,,,,,,,
+"60014","","Gartencenter Röhr & Vater","","Südstraße 811","D","1112","Dorf","123 2323883","123 92319","adr1l@googlemail.com, adr2l@googlemail.com, adr3l@googlemail.com","Herr","","Bruno","Röhr","","","","0172 6508462","","jr@schwimmbad-und-mehr.de"
+"72811",,"Nitsch","","Heuerstraße 16","D","22222","Straßback","12345","","",,,,,,,,,,