Skip to content
This repository has been archived by the owner on Jan 8, 2020. It is now read-only.

Bring fluid interface to Feed Writer #2694

Closed
wants to merge 2 commits into from

Conversation

bakura10
Copy link
Contributor

@bakura10 bakura10 commented Oct 6, 2012

This PR brings fluid interface to Feed writer.

@weierophinney
Copy link
Member

Could you please add unit tests for the fluent interface? Also, you evidently need to rebase.

Thanks!

@ghost ghost assigned weierophinney Oct 8, 2012
@bakura10
Copy link
Contributor Author

bakura10 commented Oct 8, 2012

Unit test for fluent interface ? Just check that the value returned is the same as the original object ?

I can do that.

@weierophinney
Copy link
Member

Yes, exactly. You can actually test all methods that implement a fluent interface at once -- simply chain all the calls, and verify you receive an instance of the original class.

@bakura10
Copy link
Contributor Author

Done.

->setTitle('foo')
->setType('foo');

$this->assertEquals($return, $writer);
Copy link
Member

Choose a reason for hiding this comment

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

This should be assertSame() -- assertEquals() can compare two objects for equality, without them being the same object. I'll update this on merge.

weierophinney added a commit that referenced this pull request Oct 16, 2012
- Test for same object, not equality of objects, when testing fluent
  interface
weierophinney added a commit that referenced this pull request Oct 16, 2012
weierophinney added a commit to zendframework/zend-feed that referenced this pull request May 15, 2015
- Test for same object, not equality of objects, when testing fluent
  interface
weierophinney added a commit to zendframework/zend-feed that referenced this pull request May 15, 2015
weierophinney added a commit to zendframework/zend-feed that referenced this pull request May 15, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants