setObjects($input); $output = $generator->getResult(); $this->assertVObjectEqualsVObject( $expected, $output ); } public function testArrayOfVcardStringsWithValidBirthdays() { $generator = new BirthdayCalendarGenerator(); $input = []; $input[] = <<setObjects($input); $output = $generator->getResult(); $this->assertVObjectEqualsVObject( $expected, $output ); } public function testArrayOfVcardStringsWithValidBirthdaysViaConstructor() { $input = []; $input[] = <<setObjects($input); $output = $generator->getResult(); $this->assertVObjectEqualsVObject( $expected, $output ); } public function testVcardObjectWithValidBirthday() { $generator = new BirthdayCalendarGenerator(); $input = <<setObjects($input); $output = $generator->getResult(); $this->assertVObjectEqualsVObject( $expected, $output ); } public function testArrayOfVcardObjectsWithValidBirthdays() { $generator = new BirthdayCalendarGenerator(); $input = []; $input[] = << $value) { $input[$key] = Reader::read($value); } $expected = <<setObjects($input); $output = $generator->getResult(); $this->assertVObjectEqualsVObject( $expected, $output ); } public function testVcardStringWithValidBirthdayWithXAppleOmitYear() { $generator = new BirthdayCalendarGenerator(); $input = <<setObjects($input); $output = $generator->getResult(); $this->assertVObjectEqualsVObject( $expected, $output ); } public function testVcardStringWithValidBirthdayWithoutYear() { $generator = new BirthdayCalendarGenerator(); $input = <<setObjects($input); $output = $generator->getResult(); $this->assertVObjectEqualsVObject( $expected, $output ); } public function testVcardStringWithInvalidBirthday() { $generator = new BirthdayCalendarGenerator(); $input = <<setObjects($input); $output = $generator->getResult(); $this->assertVObjectEqualsVObject( $expected, $output ); } public function testVcardStringWithNoBirthday() { $generator = new BirthdayCalendarGenerator(); $input = <<setObjects($input); $output = $generator->getResult(); $this->assertVObjectEqualsVObject( $expected, $output ); } public function testVcardStringWithValidBirthdayLocalized() { $generator = new BirthdayCalendarGenerator(); $input = <<setObjects($input); $generator->setFormat('%1$s\'s Geburtstag'); $output = $generator->getResult(); $this->assertVObjectEqualsVObject( $expected, $output ); } public function testVcardStringWithEmptyBirthdayProperty() { $generator = new BirthdayCalendarGenerator(); $input = <<setObjects($input); $output = $generator->getResult(); $this->assertVObjectEqualsVObject( $expected, $output ); } /** * @expectedException \Sabre\VObject\ParseException */ public function testParseException() { $generator = new BirthdayCalendarGenerator(); $input = <<setObjects($input); } /** * @expectedException \InvalidArgumentException */ public function testInvalidArgumentException() { $generator = new BirthdayCalendarGenerator(); $input = <<setObjects($input); } /** * @expectedException \InvalidArgumentException */ public function testInvalidArgumentExceptionForPartiallyInvalidArray() { $generator = new BirthdayCalendarGenerator(); $input = []; $input[] = <<add('VEVENT', [ 'SUMMARY' => 'Foo', 'DTSTART' => new \DateTime('NOW'), ]); $generator->setObjects($input); } public function testBrokenVcardWithoutFN() { $generator = new BirthdayCalendarGenerator(); $input = <<setObjects($input); $output = $generator->getResult(); $this->assertVObjectEqualsVObject( $expected, $output ); } }