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