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

Unit Test for getTableWhereClause method #493

Closed
wants to merge 1 commit into from

Conversation

sinner
Copy link
Contributor

@sinner sinner commented Jan 4, 2014

Unit Test for the commit doctrine#492 [Fix statement for getTableWhereClause method](
doctrine#492)
@doctrinebot
Copy link

Hello,

thank you for creating this pull request. I have automatically opened an issue
on our Jira Bug Tracker for you. See the issue link:

http://www.doctrine-project.org/jira/browse/DBAL-763

We use Jira to track the state of pull requests and the versions they got
included in.

SELECT indexrelid
FROM pg_index si, pg_class sc, pg_namespace sn
WHERE sc.relname = 'state' AND sn.nspname = ANY(string_to_array((select replace(replace(setting,'\"\$user\"',user),' ','') from pg_catalog.pg_settings where name = 'search_path'),',')) AND sc.oid=si.indrelid AND sc.relnamespace = sn.oid
) AND pg_index.indexrelid = oid", $this->_patform->getListTableForeignKeysSQL($table, $database));
Copy link
Member

Choose a reason for hiding this comment

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

It's $this->_platform. You are using it wrong everywhere.

@deeky666
Copy link
Member

deeky666 commented Jan 4, 2014

I don't think this is the right approach as we tend rather not to unittest the getList*() platform methods SQL generation. Also if so you should add that to your PR #492 by just pushing to that branch again. Closing this.

@deeky666 deeky666 closed this Jan 4, 2014
@sinner
Copy link
Contributor Author

sinner commented Jan 5, 2014

@deeky666 Sorry about that... I don't know how to make a unit test here and I don't know what is or not a private property... I guided by AbstractPostgreSqlPlatformTestCase.php and on this file access to $this->_platform without problems, even the property is not defined on this file AbstractPostgreSqlPlatformTestCase.php and PostgreSqlPlatformTest.php extends of the file above... I can't understand.

I did this only because you requested me to, but I told you earlier that I can't make a test on PHP when the change is on a SQL query. But however, somebody should make a real test for PostgreSQL platform not with a simple table named test formed by two fields, somebody should make this test using tables with PostgreSQL Schemas and foreign keys make reference to other schemas, for example... This is a joke for the PostgreSQL and Doctrine Community.

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.

3 participants