Add in unit test of dev/core#93 expansion to allow order by of more than 2 joins
authorSeamus Lee <seamuslee001@gmail.com>
Fri, 9 Nov 2018 21:01:28 +0000 (08:01 +1100)
committerSeamus Lee <seamuslee001@gmail.com>
Fri, 9 Nov 2018 21:01:28 +0000 (08:01 +1100)
tests/phpunit/CRM/Utils/TypeTest.php

index a9b1bb36bf41523c721eba849aa2c214240e4f88..dab58cbfe5967a023472a40d3260181b34785b2c 100644 (file)
@@ -73,6 +73,8 @@ class CRM_Utils_TypeTest extends CiviUnitTestCase {
       array('field(table.civicrm_column_name,4,5,6)', 'MysqlOrderBy', 'field(table.civicrm_column_name,4,5,6)'),
       array('table.civicrm_column_name desc,other_column, another_column desc', 'MysqlOrderBy', 'table.civicrm_column_name desc,other_column, another_column desc'),
       array('table.`Home-street_address` asc, `table-alias`.`Home-street_address` desc,`table-alias`.column', 'MysqlOrderBy', 'table.`Home-street_address` asc, `table-alias`.`Home-street_address` desc,`table-alias`.column'),
+      // Lab issue dev/core#93 allow for 3 column orderby
+      array('contact_id.gender_id.label', 'MysqlOrderBy', 'contact_id.gender_id.label'),
       array('a string', 'String', 'a string'),
       array('{"contact":{"contact_id":205}}', 'Json', '{"contact":{"contact_id":205}}'),
       array('{"contact":{"contact_id":!n†rude®}}', 'Json', NULL),