From 9e2b2a32fd0e967ad3184e9a5d091a29953acb91 Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Wed, 25 Oct 2017 16:22:10 -0700 Subject: Include composer dependencies in repo --- .../eluceo/ical/tests/Eluceo/iCal/PropertyTest.php | 42 ++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 vendor/eluceo/ical/tests/Eluceo/iCal/PropertyTest.php (limited to 'vendor/eluceo/ical/tests/Eluceo/iCal/PropertyTest.php') diff --git a/vendor/eluceo/ical/tests/Eluceo/iCal/PropertyTest.php b/vendor/eluceo/ical/tests/Eluceo/iCal/PropertyTest.php new file mode 100644 index 00000000..b30f5a3a --- /dev/null +++ b/vendor/eluceo/ical/tests/Eluceo/iCal/PropertyTest.php @@ -0,0 +1,42 @@ +assertEquals( + 'DTSTAMP:20131020T153112', + $property->toLine() + ); + } + + public function testPropertyWithValueAndParams() + { + $property = new Property('DTSTAMP', '20131020T153112', array('TZID' => 'Europe/Berlin')); + $this->assertEquals( + 'DTSTAMP;TZID=Europe/Berlin:20131020T153112', + $property->toLine() + ); + } + + public function testPropertyWithEscapedSingleValue() + { + $property = new Property('SOMEPROP', 'Escape me!"'); + $this->assertEquals( + 'SOMEPROP:Escape me!\\"', + $property->toLine() + ); + } + + public function testPropertyWithEscapedValues() + { + $property = new Property('SOMEPROP', 'Escape me!"', array('TEST' => 'Lorem "test" ipsum')); + $this->assertEquals( + 'SOMEPROP;TEST="Lorem \\"test\\" ipsum":Escape me!\\"', + $property->toLine() + ); + } +} -- cgit v1.2.3