]> source.dussan.org Git - nextcloud-server.git/commitdiff
StringProperty unittest
authorThomas Tanghus <thomas@tanghus.net>
Mon, 8 Apr 2013 20:54:30 +0000 (22:54 +0200)
committerThomas Tanghus <thomas@tanghus.net>
Mon, 8 Apr 2013 20:54:30 +0000 (22:54 +0200)
tests/lib/vobject.php [new file with mode: 0644]

diff --git a/tests/lib/vobject.php b/tests/lib/vobject.php
new file mode 100644 (file)
index 0000000..1103a4b
--- /dev/null
@@ -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