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

Already on GitHub? Sign in to your account

Tests for a generic custom datasource #605

merged 1 commit into from Apr 14, 2012


None yet
2 participants

shama commented Apr 11, 2012

This test is for a generic custom datasource such as the TwitterSource example in the docs or other datasources that don't necessarily use databases.

It also defaults startQuote and endQuote to avoid error when a custom datasource calls set() that contains a field with an array as its value. As only the DboSource datasources have those properties where a generic datasource do not.

@shama shama Tests for a generic custom datasource
Default startQuote and endQuote to avoid error with non-database datasources

markstory commented Apr 12, 2012

It seems like this change would fix http://cakephp.lighthouseapp.com/projects/42648/tickets/2769 would it not?


shama commented Apr 12, 2012

Oh I didn't see that ticket but yes this change will fix 2769. I ran into this today while working on an update for the datasources docs. Funny coincidence.

EDIT: I should also say the reason I chose this way is startQuote and endQuote are database specific and don't necessarily belong as properties on DataSource. Defaulting rather than checking isset also allows for one to be set and not the other to allow a possible rare db datasource circumstance.

@markstory markstory added a commit that referenced this pull request Apr 14, 2012

@markstory markstory Merge pull request #605 from shama/patch-datasource-test
Add checks for startQuote & endQuote.

Fixes #2769

@markstory markstory merged commit 6167529 into cakephp:2.1 Apr 14, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment