Skip to content

Commit 62eaeb0

Browse files
committed
improve error reporting in ConvertQueriesBackAndForthTest
1 parent 3a07492 commit 62eaeb0

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tests/06_Query/QOM/ConvertQueriesBackAndForthTest.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,9 @@ public function testBackAndForth()
5353
foreach ($this->qomQueries as $name => $originalQomQuery) {
5454
$originalSql2Query = $this->sql2Queries[$name];
5555
if (is_array($originalSql2Query)) {
56+
$this->assertGreaterThan(0, count($originalSql2Query), 'empty list of queries');
5657
$passed = false;
58+
$sql2 = 'None of the QOM statements matched';
5759
foreach ($originalSql2Query as $query) {
5860
$qom = $this->sql2Parser->parse($query);
5961
if ($originalQomQuery->getStatement() == $qom->getStatement()) {
@@ -64,7 +66,7 @@ public function testBackAndForth()
6466
}
6567
}
6668
}
67-
$this->assertTrue($passed, "QOM-->SQL2->QOM: Original query variation = ".$query);
69+
$this->assertTrue($passed, "QOM-->SQL2->QOM: Query variation $name resulted in SQL2 that is not found: $sql2");
6870
} else {
6971
$qom = $this->sql2Parser->parse($originalSql2Query);
7072
$this->assertEquals($originalQomQuery, $qom, "QOM-->SQL2: Original query = $originalSql2Query");

0 commit comments

Comments
 (0)