diff options
author | redmatrix <git@macgirvin.com> | 2016-05-10 17:26:44 -0700 |
---|---|---|
committer | redmatrix <git@macgirvin.com> | 2016-05-10 17:26:44 -0700 |
commit | 0b02a6d123b2014705998c94ddf3d460948d3eac (patch) | |
tree | 78ff2cab9944a4f5ab3f80ec93cbe1120de90bb2 /vendor/sabre/vobject/tests/Sabre/VObject/Splitter/VCardTest.php | |
parent | 40b5b6e9d2da7ab65c8b4d38cdceac83a4d78deb (diff) | |
download | volse-hubzilla-0b02a6d123b2014705998c94ddf3d460948d3eac.tar.gz volse-hubzilla-0b02a6d123b2014705998c94ddf3d460948d3eac.tar.bz2 volse-hubzilla-0b02a6d123b2014705998c94ddf3d460948d3eac.zip |
initial sabre upgrade (needs lots of work - to wit: authentication, redo the browser interface, and rework event export/import)
Diffstat (limited to 'vendor/sabre/vobject/tests/Sabre/VObject/Splitter/VCardTest.php')
-rw-r--r-- | vendor/sabre/vobject/tests/Sabre/VObject/Splitter/VCardTest.php | 138 |
1 files changed, 0 insertions, 138 deletions
diff --git a/vendor/sabre/vobject/tests/Sabre/VObject/Splitter/VCardTest.php b/vendor/sabre/vobject/tests/Sabre/VObject/Splitter/VCardTest.php deleted file mode 100644 index b6b41925f..000000000 --- a/vendor/sabre/vobject/tests/Sabre/VObject/Splitter/VCardTest.php +++ /dev/null @@ -1,138 +0,0 @@ -<?php - -namespace Sabre\VObject\Splitter; - -use Sabre\VObject; - -class VCardSplitterTest extends \PHPUnit_Framework_TestCase { - - function createStream($data) { - - $stream = fopen('php://memory','r+'); - fwrite($stream, $data); - rewind($stream); - return $stream; - - } - - function testVCardImportValidVCard() { - $data = <<<EOT -BEGIN:VCARD -UID:foo -END:VCARD -EOT; - $tempFile = $this->createStream($data); - - $objects = new VCard($tempFile); - - $return = ""; - while($object=$objects->getNext()) { - $return .= $object->serialize(); - } - - VObject\Reader::read($return); - } - - function testVCardImportValidVCardsWithCategories() { - $data = <<<EOT -BEGIN:VCARD -UID:card-in-foo1-and-foo2 -CATEGORIES:foo1\,foo2 -END:VCARD -BEGIN:VCARD -UID:card-in-foo1 -CATEGORIES:foo1 -END:VCARD -BEGIN:VCARD -UID:card-in-foo3 -CATEGORIES:foo3 -END:VCARD -BEGIN:VCARD -UID:card-in-foo1-and-foo3 -CATEGORIES:foo1\,foo3 -END:VCARD -EOT; - $tempFile = $this->createStream($data); - - $objects = new VCard($tempFile); - - $return = ""; - while($object=$objects->getNext()) { - $return .= $object->serialize(); - } - - VObject\Reader::read($return); - } - - function testVCardImportEndOfData() { - $data = <<<EOT -BEGIN:VCARD -UID:foo -END:VCARD -EOT; - $tempFile = $this->createStream($data); - - $objects = new VCard($tempFile); - $object=$objects->getNext(); - - $this->assertFalse($object=$objects->getNext()); - - - } - - /** - * @expectedException InvalidArgumentException - */ - function testVCardImportCheckInvalidArgumentException() { - $data = <<<EOT -BEGIN:FOO -END:FOO -EOT; - $tempFile = $this->createStream($data); - - $objects = new VCard($tempFile); - while($object=$objects->getNext()) { - $return .= $object->serialize(); - } - - } - - function testVCardImportMultipleValidVCards() { - $data = <<<EOT -BEGIN:VCARD -UID:foo -END:VCARD -BEGIN:VCARD -UID:foo -END:VCARD -EOT; - $tempFile = $this->createStream($data); - - $objects = new VCard($tempFile); - - $return = ""; - while($object=$objects->getNext()) { - $return .= $object->serialize(); - } - - VObject\Reader::read($return); - } - - function testVCardImportVCardWithoutUID() { - $data = <<<EOT -BEGIN:VCARD -END:VCARD -EOT; - $tempFile = $this->createStream($data); - - $objects = new VCard($tempFile); - - $return = ""; - while($object=$objects->getNext()) { - $return .= $object->serialize(); - } - - VObject\Reader::read($return); - } - -} |