Skip to content
This repository was archived by the owner on May 16, 2018. It is now read-only.

Conversation

@DragonBe
Copy link
Contributor

Unit test for ZF-1.12.7 (issue #378 & #381) regarding select statements with ordering direction, multiple order fields and conditional ordering.

…ts with ordering direction or condition
@mhujer
Copy link
Contributor

mhujer commented Jun 17, 2014

Tests are failing on Travis?

@weierophinney
Copy link
Member

@mhujer that's kind of the point. @DragonBe has written some unit tests showing behavior that worked prior to 1.12.7 but which does not now. @ezimuel -- can you review these tests, and make sure they're valid? If so, let's work with @DragonBe towards a solution.

@mhujer
Copy link
Contributor

mhujer commented Jun 18, 2014

It's just that those failures are not the kind I would have expected.

There were 10 errors:
1) Zend_Db_Select_StaticTest::testOrderOfConditionalFieldWithDirection
Missing argument 1 for Zend_Db_Select_StaticTest::testOrderOfConditionalFieldWithDirection()
/home/travis/build/zendframework/zf1/tests/Zend/Db/Select/StaticTest.php:881
2) Zend_Db_Table_Select_StaticTest::testOrderOfConditionalFieldWithDirection
Missing argument 1 for Zend_Db_Table_Select_StaticTest::testOrderOfConditionalFieldWithDirection()
/home/travis/build/zendframework/zf1/tests/Zend/Db/Table/Select/StaticTest.php:757
3) Zend_Db_Select_MysqliTest::testOrderOfConditionalFieldWithDirection
Missing argument 1 for Zend_Db_Select_TestCommon::testOrderOfConditionalFieldWithDirection()
/home/travis/build/zendframework/zf1/tests/Zend/Db/Select/TestCommon.php:1817
4) Zend_Db_Table_Select_MysqliTest::testOrderOfConditionalFieldWithDirection
Missing argument 1 for Zend_Db_Select_TestCommon::testOrderOfConditionalFieldWithDirection()
/home/travis/build/zendframework/zf1/tests/Zend/Db/Select/TestCommon.php:1817
5) Zend_Db_Select_Pdo_MysqlTest::testOrderOfConditionalFieldWithDirection
Missing argument 1 for Zend_Db_Select_TestCommon::testOrderOfConditionalFieldWithDirection()
/home/travis/build/zendframework/zf1/tests/Zend/Db/Select/TestCommon.php:1817
6) Zend_Db_Table_Select_Pdo_MysqlTest::testOrderOfConditionalFieldWithDirection
Missing argument 1 for Zend_Db_Select_TestCommon::testOrderOfConditionalFieldWithDirection()
/home/travis/build/zendframework/zf1/tests/Zend/Db/Select/TestCommon.php:1817
7) Zend_Db_Select_Pdo_PgsqlTest::testOrderOfConditionalFieldWithDirection
Missing argument 1 for Zend_Db_Select_Pdo_PgsqlTest::testOrderOfConditionalFieldWithDirection()
/home/travis/build/zendframework/zf1/tests/Zend/Db/Select/Pdo/PgsqlTest.php:187
8) Zend_Db_Table_Select_Pdo_PgsqlTest::testOrderOfConditionalFieldWithDirection
Missing argument 1 for Zend_Db_Table_Select_Pdo_PgsqlTest::testOrderOfConditionalFieldWithDirection()
/home/travis/build/zendframework/zf1/tests/Zend/Db/Table/Select/Pdo/PgsqlTest.php:191
9) Zend_Db_Select_Pdo_SqliteTest::testOrderOfConditionalFieldWithDirection
Missing argument 1 for Zend_Db_Select_Pdo_SqliteTest::testOrderOfConditionalFieldWithDirection()
/home/travis/build/zendframework/zf1/tests/Zend/Db/Select/Pdo/SqliteTest.php:234
10) Zend_Db_Table_Select_Pdo_SqliteTest::testOrderOfConditionalFieldWithDirection
Missing argument 1 for Zend_Db_Table_Select_Pdo_SqliteTest::testOrderOfConditionalFieldWithDirection()
/home/travis/build/zendframework/zf1/tests/Zend/Db/Table/Select/Pdo/SqliteTest.php:238

Copy link
Contributor

Choose a reason for hiding this comment

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

param $adapter shouldn't be here (or in other tests)

@weierophinney
Copy link
Member

@mhujer Oh -- yep -- @DragonBe -- it looks like you missed adding a @dataProvider annotation to those tests...

@ezimuel
Copy link
Contributor

ezimuel commented Jun 18, 2014

@mhujer @weierophinney I fixed the unit tests, I sent a PR to @DragonBe, https://github.com/DragonBe/zf1/pull/1. Basically the $adapter was not used in the tests, I just removed it.
All the tests passed, as you can see on my Travis CI. That means the issue #378 is not an issue? @DragonBe if you have an SQL statement that doesn't work on your side let me know, we can work together to find a solution.

@DragonBe
Copy link
Contributor Author

oh dang! yes, they were taken from my example test… but since we have tests here per adapter, it was not necessary to provide a @dataProvider in here. My bad.

Let me take the pull request for fix and check the code again to see where I injected the $adapter. Sorry about my clumsiness… but there's not a "quick" way to run tests on ZF1 if you don't have the infrastructure configured correctly… should work a little more on that as well.

@DragonBe
Copy link
Contributor Author

Ok, test now pass on Travis. Great for Zend Framework, not so much for our use cases…

Will need to check where our applications break upon, must be something between Zend_Db_Select and our logic. Will add a profiler on our "special" queries to see where things go crazy.

Updates pending on this issue.

ezimuel added a commit that referenced this pull request Jun 19, 2014
@ezimuel ezimuel merged commit 91b0baf into zendframework:master Jun 19, 2014
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.

4 participants