aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Tanghus <thomas@tanghus.net>2013-04-08 22:54:30 +0200
committerThomas Tanghus <thomas@tanghus.net>2013-04-08 22:54:30 +0200
commita783bdaec14a24f5b785c2f98214df02f8dd74f7 (patch)
treefa0e674788b0295ae4d508fea8c58a3c9d242635
parentae9548bc6e70a2ec4f1b2d1f6fcbb160e5ba666a (diff)
downloadnextcloud-server-a783bdaec14a24f5b785c2f98214df02f8dd74f7.tar.gz
nextcloud-server-a783bdaec14a24f5b785c2f98214df02f8dd74f7.zip
StringProperty unittest
-rw-r--r--tests/lib/vobject.php19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/lib/vobject.php b/tests/lib/vobject.php
new file mode 100644
index 00000000000..1103a4b3297
--- /dev/null
+++ b/tests/lib/vobject.php
@@ -0,0 +1,19 @@
+<?php
+/**
+ * Copyright (c) 2013 Thomas Tanghus (thomas@tanghus.net)
+ * This file is licensed under the Affero General Public License version 3 or
+ * later.
+ * See the COPYING-README file.
+ */
+
+class Test_VObject extends PHPUnit_Framework_TestCase {
+
+ public function setUp() {
+ Sabre\VObject\Property::$classMap['SUMMARY'] = 'OC\VObject\StringProperty';
+ }
+
+ function testStringProperty() {
+ $property = Sabre\VObject\Property::create('SUMMARY', 'Escape;this,please');
+ $this->assertEquals("SUMMARY:Escape\;this\,please\r\n", $property->serialize());
+ }
+} \ No newline at end of file