Paweł Słowik
2012-09-13 2cdaa79dce689b2dc9ef5c7bf3dcbd9446d86c21
tests/Framework/VCard.php
@@ -49,6 +49,20 @@
        $this->assertEquals("Iksiñski", $vcards2[0]->surname, "Detect charset in encoded values");
    }
    function test_import_photo_encoding()
    {
        $input = file_get_contents($this->_srcpath('photo.vcf'));
        $vcards = rcube_vcard::import($input);
        $vcard = $vcards[0]->get_assoc();
        $this->assertCount(1, $vcards, "Detected 1 vcard");
        // ENCODING=b case (#1488683)
        $this->assertEquals("/9j/4AAQSkZJRgABAQA", substr(base64_encode($vcard['photo']), 0, 19), "Photo decoding");
        $this->assertEquals("Müller", $vcard['surname'], "Unicode characters");
    }
    function test_encodings()
    {
        $input = file_get_contents($this->_srcpath('utf-16_sample.vcf'));