Skip to content

Commit 9837c18

Browse files
committed
Add (failing) test for building GROUP BY clause
Issue #154 Signed-off-by: Michal Čihař <michal@cihar.com>
1 parent 4da4601 commit 9837c18

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

tests/Builder/SelectStatementTest.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,4 +90,16 @@ public function testBuilderIntoOptions()
9090
$stmt->build()
9191
);
9292
}
93+
94+
public function testBuildGroupBy()
95+
{
96+
$query = 'SELECT COUNT(CustomerID), Country FROM Customers GROUP BY Country ';
97+
$parser = new Parser($query);
98+
$stmt = $parser->statements[0];
99+
100+
$this->assertEquals(
101+
$query,
102+
$stmt->build()
103+
);
104+
}
93105
}

0 commit comments

Comments
 (0)