Skip to content

Commit

Permalink
Merge pull request #17262 from totten/5.26-test-sql-op
Browse files Browse the repository at this point in the history
SyntaxConformanceTest::testSqlOperators - Fix failure on MySQL 8
  • Loading branch information
seamuslee001 authored May 8, 2020
2 parents 17a6ba9 + 5d60cab commit fd525a9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/phpunit/api/v3/SyntaxConformanceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -575,6 +575,7 @@ public static function toBeSkipped_getSqlOperators() {
];

// The testSqlOperators fails sporadically on MySQL 5.5, which is deprecated anyway.
// Re:^^^ => the failure was probably correct behavior, and test is now fixed, but yeah 5.5 is deprecated, and don't care enough to verify.
// Test data providers should be able to run in pre-boot environment, so we connect directly to SQL server.
require_once 'DB.php';
$db = DB::connect(CIVICRM_DSN);
Expand Down Expand Up @@ -1104,7 +1105,7 @@ public function testSqlOperators($entityName) {
}
$totalEntities = 3;
}
$entities = $this->callAPISuccess($entityName, 'get', ['options' => ['limit' => 0]]);
$entities = $this->callAPISuccess($entityName, 'get', ['options' => ['limit' => 0, 'sort' => 'id']]);
$entities = array_keys($entities['values']);
$this->assertGreaterThan(2, $totalEntities);
$this->callAPISuccess($entityName, 'getsingle', ['id' => ['IN' => [$entities[0]]]]);
Expand Down

0 comments on commit fd525a9

Please sign in to comment.