diff options
author | Thomas Tanghus <thomas@tanghus.net> | 2013-04-08 22:54:30 +0200 |
---|---|---|
committer | Thomas Tanghus <thomas@tanghus.net> | 2013-05-16 16:58:50 +0200 |
commit | 197914480e51b5a2ce37b306ad58e6a82973be85 (patch) | |
tree | d72907901d0e535decdb66188b522de8013e27f1 /tests | |
parent | 3a6181620afdd848189a8d8c1708efd60b29ef1f (diff) | |
download | nextcloud-server-197914480e51b5a2ce37b306ad58e6a82973be85.tar.gz nextcloud-server-197914480e51b5a2ce37b306ad58e6a82973be85.zip |
StringProperty unittest
Diffstat (limited to 'tests')
-rw-r--r-- | tests/lib/vobject.php | 19 |
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 |