From bd0551b22076b82a6d49e9f7a2b2e0c90a1b2326 Mon Sep 17 00:00:00 2001 From: Aleksander Machniak <alec@alec.pl> Date: Fri, 05 Feb 2016 07:25:27 -0500 Subject: [PATCH] Secure also downloads of addressbook exports, managesieve script exports and Enigma keys exports --- 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 4f48dfa..34faf7d 100644 --- a/tests/Framework/Csv2vcard.php +++ b/tests/Framework/Csv2vcard.php @@ -73,4 +73,22 @@ $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); + } } -- Gitblit v1.9.1