diff options
author | Aleksander Machniak <alec@alec.pl> | 2014-12-01 14:26:52 +0100 |
---|---|---|
committer | Aleksander Machniak <alec@alec.pl> | 2014-12-01 14:26:52 +0100 |
commit | f864495b7b7ab577e3aba5f06b34f92649de4a4b (patch) | |
tree | cd426af16fda5de577d31cc4a3899892928678ca /tests/Framework | |
parent | cf7471eb8608740a02b8ef3d1ca4899096e028fc (diff) |
Fix import of multiple contact email addresses from Outlook-csv format (#1490169)
Diffstat (limited to 'tests/Framework')
-rw-r--r-- | tests/Framework/Csv2vcard.php | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/Framework/Csv2vcard.php b/tests/Framework/Csv2vcard.php index 4f48dfaa2..34faf7d8d 100644 --- a/tests/Framework/Csv2vcard.php +++ b/tests/Framework/Csv2vcard.php @@ -73,4 +73,22 @@ class Framework_Csv2vcard extends PHPUnit_Framework_TestCase $this->assertEquals($vcf_text, $vcard); } + + function test_import_outlook() + { + $csv_text = file_get_contents(TESTS_DIR . '/src/Csv2vcard/outlook.csv'); + $vcf_text = file_get_contents(TESTS_DIR . '/src/Csv2vcard/outlook.vcf'); + + $csv = new rcube_csv2vcard; + $csv->import($csv_text); + $result = $csv->export(); + $vcard = $result[0]->export(false); + + $this->assertCount(1, $result); + + $vcf_text = trim(str_replace("\r\n", "\n", $vcf_text)); + $vcard = trim(str_replace("\r\n", "\n", $vcard)); + + $this->assertEquals($vcf_text, $vcard); + } } |