[Pkg-owncloud-commits] [php-sabre-vobject] 30/46: Error cases
David Prévot
taffit at moszumanska.debian.org
Thu Dec 10 02:12:40 UTC 2015
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository php-sabre-vobject.
commit 737bef842cd275c59c9ea9c61f1a1040c07faf3f
Author: Evert Pot <me at evertpot.com>
Date: Thu Nov 26 00:37:18 2015 -0500
Error cases
---
tests/VObject/Parser/MimeDirTest.php | 27 +++++++++++++++++++++++++++
1 file changed, 27 insertions(+)
diff --git a/tests/VObject/Parser/MimeDirTest.php b/tests/VObject/Parser/MimeDirTest.php
index bf7f405..7ce66b8 100644
--- a/tests/VObject/Parser/MimeDirTest.php
+++ b/tests/VObject/Parser/MimeDirTest.php
@@ -67,4 +67,31 @@ VCF;
$this->assertEquals("umlaut u - \xFC", $vcard->FN->getValue());
}
+
+ /**
+ * @expectedException \InvalidArgumentException
+ */
+ function testDecodeUnsupportedCharset() {
+
+ $mimeDir = new Mimedir();
+ $mimeDir->setCharSet('foobar');
+
+ }
+
+ /**
+ * @expectedException \Sabre\VObject\ParseException
+ */
+ function testDecodeUnsupportedInlineCharset() {
+
+ $vcard = <<<VCF
+BEGIN:VCARD
+VERSION:3.0
+FN;CHARSET=foobar:nothing
+END:VCARD\n
+VCF;
+
+ $mimeDir = new Mimedir();
+ $mimeDir->parse($vcard);
+
+ }
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/php-sabre-vobject.git
More information about the Pkg-owncloud-commits
mailing list