annotate vendor/sabre/vobject/tests/VObject/SlashRTest.php @ 7:430dbd5346f7

vendor sabre as distributed
author Charlie Root
date Sat, 13 Jan 2018 09:06:10 -0500
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7
430dbd5346f7 vendor sabre as distributed
Charlie Root
parents:
diff changeset
1 <?php
430dbd5346f7 vendor sabre as distributed
Charlie Root
parents:
diff changeset
2
430dbd5346f7 vendor sabre as distributed
Charlie Root
parents:
diff changeset
3 namespace Sabre\VObject;
430dbd5346f7 vendor sabre as distributed
Charlie Root
parents:
diff changeset
4
430dbd5346f7 vendor sabre as distributed
Charlie Root
parents:
diff changeset
5 /**
430dbd5346f7 vendor sabre as distributed
Charlie Root
parents:
diff changeset
6 * This issue was pointed out in Issue 55. \r should be stripped completely
430dbd5346f7 vendor sabre as distributed
Charlie Root
parents:
diff changeset
7 * when encoding property values.
430dbd5346f7 vendor sabre as distributed
Charlie Root
parents:
diff changeset
8 */
430dbd5346f7 vendor sabre as distributed
Charlie Root
parents:
diff changeset
9 class SlashRTest extends \PHPUnit_Framework_TestCase {
430dbd5346f7 vendor sabre as distributed
Charlie Root
parents:
diff changeset
10
430dbd5346f7 vendor sabre as distributed
Charlie Root
parents:
diff changeset
11 function testEncode() {
430dbd5346f7 vendor sabre as distributed
Charlie Root
parents:
diff changeset
12
430dbd5346f7 vendor sabre as distributed
Charlie Root
parents:
diff changeset
13 $vcal = new Component\VCalendar();
430dbd5346f7 vendor sabre as distributed
Charlie Root
parents:
diff changeset
14 $prop = $vcal->add('test', "abc\r\ndef");
430dbd5346f7 vendor sabre as distributed
Charlie Root
parents:
diff changeset
15 $this->assertEquals("TEST:abc\\ndef\r\n", $prop->serialize());
430dbd5346f7 vendor sabre as distributed
Charlie Root
parents:
diff changeset
16
430dbd5346f7 vendor sabre as distributed
Charlie Root
parents:
diff changeset
17 }
430dbd5346f7 vendor sabre as distributed
Charlie Root
parents:
diff changeset
18
430dbd5346f7 vendor sabre as distributed
Charlie Root
parents:
diff changeset
19
430dbd5346f7 vendor sabre as distributed
Charlie Root
parents:
diff changeset
20 }