createStream($data); $objects = new VCard($tempFile); $count = 0; while ($objects->getNext()) { ++$count; } $this->assertEquals(1, $count); } /** * @expectedException \Sabre\VObject\ParseException */ public function testVCardImportWrongType() { $event[] = <<createStream($data); $splitter = new VCard($tempFile); while ($object = $splitter->getNext()) { } } public function testVCardImportValidVCardsWithCategories() { $data = <<createStream($data); $splitter = new VCard($tempFile); $count = 0; while ($object = $splitter->getNext()) { ++$count; } $this->assertEquals(4, $count); } public function testVCardImportEndOfData() { $data = <<createStream($data); $objects = new VCard($tempFile); $object = $objects->getNext(); $this->assertNull($objects->getNext()); } /** * @expectedException \Sabre\VObject\ParseException */ public function testVCardImportCheckInvalidArgumentException() { $data = <<createStream($data); $objects = new VCard($tempFile); while ($objects->getNext()) { } } public function testVCardImportMultipleValidVCards() { $data = <<createStream($data); $objects = new VCard($tempFile); $count = 0; while ($objects->getNext()) { ++$count; } $this->assertEquals(2, $count); } public function testImportMultipleSeparatedWithNewLines() { $data = <<createStream($data); $objects = new VCard($tempFile); $count = 0; while ($objects->getNext()) { ++$count; } $this->assertEquals(2, $count); } public function testVCardImportVCardWithoutUID() { $data = <<createStream($data); $objects = new VCard($tempFile); $count = 0; while ($objects->getNext()) { ++$count; } $this->assertEquals(1, $count); } }