File tree 2 files changed +15
-1
lines changed
tests/Type/Doctrine/Query
2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change 50
50
use function serialize ;
51
51
use function sprintf ;
52
52
use function strtolower ;
53
+ use function strtoupper ;
53
54
use function unserialize ;
54
55
55
56
/**
@@ -930,7 +931,7 @@ public function walkSimpleSelectExpression($simpleSelectExpression): string
930
931
*/
931
932
public function walkAggregateExpression ($ aggExpression ): string
932
933
{
933
- switch ($ aggExpression ->functionName ) {
934
+ switch (strtoupper ( $ aggExpression ->functionName ) ) {
934
935
case 'MAX ' :
935
936
case 'MIN ' :
936
937
$ type = $ this ->unmarshalType (
Original file line number Diff line number Diff line change @@ -645,6 +645,19 @@ public function getTestData(): iterable
645
645
' ,
646
646
];
647
647
648
+ yield 'aggregate lowercase ' => [
649
+ $ this ->constantArray ([
650
+ [
651
+ new ConstantStringType ('foo ' ),
652
+ TypeCombinator::addNull ($ this ->numericStringified ()),
653
+ ],
654
+ ]),
655
+ '
656
+ SELECT avg(m.intColumn) as foo
657
+ FROM QueryResult\Entities\Many m
658
+ ' ,
659
+ ];
660
+
648
661
yield 'aggregate with group by ' => [
649
662
$ this ->constantArray ([
650
663
[
You can’t perform that action at this time.
0 commit comments