From 969afea733012415c1662d90e735227e3b30e746 Mon Sep 17 00:00:00 2001 From: Dominik Tobschall Date: Mon, 22 Dec 2014 14:28:17 +0100 Subject: [PATCH 1/3] test for vcard converter issue --- tests/VObject/IssueXXTest.php | 47 +++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 tests/VObject/IssueXXTest.php diff --git a/tests/VObject/IssueXXTest.php b/tests/VObject/IssueXXTest.php new file mode 100644 index 000000000..2e76086bf --- /dev/null +++ b/tests/VObject/IssueXXTest.php @@ -0,0 +1,47 @@ +assertInstanceOf('Sabre\\VObject\\Component\\VCard', $vcard); + $vcard = $vcard->convert(\Sabre\VObject\Document::VCARD40); + $vcard = $vcard->serialize(); + + $converted = Reader::read($vcard); + $converted->validate(); + + $version = Version::VERSION; + + $expected = <<assertEquals($expected, str_replace("\r","", $vcard)); + + } + +} From ed12b5ecf90f6b1f559b1760d0a951ccf23709f1 Mon Sep 17 00:00:00 2001 From: Dominik Tobschall Date: Mon, 22 Dec 2014 14:32:13 +0100 Subject: [PATCH 2/3] renamed test --- tests/VObject/{IssueXXTest.php => Issue173Test.php} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename tests/VObject/{IssueXXTest.php => Issue173Test.php} (92%) diff --git a/tests/VObject/IssueXXTest.php b/tests/VObject/Issue173Test.php similarity index 92% rename from tests/VObject/IssueXXTest.php rename to tests/VObject/Issue173Test.php index 2e76086bf..f3211542a 100644 --- a/tests/VObject/IssueXXTest.php +++ b/tests/VObject/Issue173Test.php @@ -2,7 +2,7 @@ namespace Sabre\VObject; -class IssueXXTest extends \PHPUnit_Framework_TestCase { +class Issue173Test extends \PHPUnit_Framework_TestCase { function testConvert() { From 2160023a9b964dce19aaf7478716b8d500488c2f Mon Sep 17 00:00:00 2001 From: Dominik Tobschall Date: Mon, 22 Dec 2014 15:07:32 +0100 Subject: [PATCH 3/3] moved test into VCardConverterTests --- tests/VObject/Issue173Test.php | 47 ---------------------------- tests/VObject/VCardConverterTest.php | 41 ++++++++++++++++++++++++ 2 files changed, 41 insertions(+), 47 deletions(-) delete mode 100644 tests/VObject/Issue173Test.php diff --git a/tests/VObject/Issue173Test.php b/tests/VObject/Issue173Test.php deleted file mode 100644 index f3211542a..000000000 --- a/tests/VObject/Issue173Test.php +++ /dev/null @@ -1,47 +0,0 @@ -assertInstanceOf('Sabre\\VObject\\Component\\VCard', $vcard); - $vcard = $vcard->convert(\Sabre\VObject\Document::VCARD40); - $vcard = $vcard->serialize(); - - $converted = Reader::read($vcard); - $converted->validate(); - - $version = Version::VERSION; - - $expected = <<assertEquals($expected, str_replace("\r","", $vcard)); - - } - -} diff --git a/tests/VObject/VCardConverterTest.php b/tests/VObject/VCardConverterTest.php index c4e40ee9c..1aa8a64d0 100644 --- a/tests/VObject/VCardConverterTest.php +++ b/tests/VObject/VCardConverterTest.php @@ -487,4 +487,45 @@ function testMultipleAnniversaries() { ); } + + function testNoLabel() { + + $input = <<assertInstanceOf('Sabre\\VObject\\Component\\VCard', $vcard); + $vcard = $vcard->convert(\Sabre\VObject\Document::VCARD40); + $vcard = $vcard->serialize(); + + $converted = Reader::read($vcard); + $converted->validate(); + + $version = Version::VERSION; + + $expected = <<assertEquals($expected, str_replace("\r","", $vcard)); + + } + }