Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test for vcard converter issue #173

Merged
merged 3 commits into from
Jan 10, 2015
Merged

test for vcard converter issue #173

merged 3 commits into from
Jan 10, 2015

Conversation

DominikTo
Copy link
Member

vCard converter fails for X-ABDATE properties that have no X-ABLABEL.
Thanks, @armin-hackmann! :-)

@evert
Copy link
Member

evert commented Dec 22, 2014

Please add this test to VCardConverterTest. IssueXXTest is a bad convention

@DominikTo
Copy link
Member Author

Updated.

$vcard = Reader::read($input);

$this->assertInstanceOf('Sabre\\VObject\\Component\\VCard', $vcard);
$vcard = $vcard->convert(\Sabre\VObject\Document::VCARD40);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Simply using VObject\Document::VCARD40 might be valid here (because of the namespace).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure what is preferred here. It's not omitted anywhere in the test class.
Should probably be omitted everywhere or nowhere. :)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, didn't check around this test case. Yes, it should be omitted everywhere ;-).

@Hywan
Copy link
Member

Hywan commented Dec 23, 2014

Build fails inside the converter class.

@DominikTo
Copy link
Member Author

Yup. $label->getValue() shouldn't be called if there is no label.

@DominikTo
Copy link
Member Author

Checking if $label exists here would help, but then the property gets converted like this:

  • From: item1.X-ABDATE;type=pref:2008-12-11
  • To: ITEM1.ANNIVERSARY;PREF=1;VALUE=UNKNOWN:2008-12-11

Don't think that would be the expected conversion.

@Hywan
Copy link
Member

Hywan commented Dec 23, 2014

What is the expected value?

@Hywan Hywan added bug and removed enhancement labels Dec 23, 2014
@DominikTo
Copy link
Member Author

The vCard 3.0 version had no (Anniversary) label property, so I wasn't sure about the vCard 4.0 representation as ITEM1.ANNIVERSARY. Also the VALUE=UNKNOWN seems to be unexpected output (at least for me). ;-)

evert added a commit that referenced this pull request Jan 10, 2015
@evert evert merged commit ef3fb4a into 3.3 Jan 10, 2015
evert added a commit that referenced this pull request Jan 10, 2015
evert added a commit that referenced this pull request Jan 10, 2015
@evert evert deleted the x-ablabel-convert-issue branch March 30, 2016 00:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants