@@ -1109,10 +1109,12 @@ public function testWhereVariant()
11091109 ->whereNotIn ('created ' , [55 , 66 ])
11101110 ->whereNotLike ('content ' , '%qwe% ' );
11111111
1112- self ::assertSqlEquals (
1113- 'SELECT * FROM "foo" WHERE "id" IN (1, 2, 3) AND "id" NOT IN (5, 6, 7) '
1114- . 'AND "time" BETWEEN \'2012-03-30 \' AND \'2020-02-24 \' '
1115- . 'AND "created" NOT IN (55, 66) AND "content" NOT LIKE \'%qwe% \'' ,
1112+ self ::assertSqlFormatEquals (
1113+ <<<SQL
1114+ SELECT * FROM "foo" WHERE "id" IN (1, 2, 3) AND "id" NOT IN (5, 6, 7)
1115+ AND "time" BETWEEN '2012-03-30' AND '2020-02-24'
1116+ AND "created" NOT IN (55, 66) AND "content" NOT LIKE '%qwe%'
1117+ SQL ,
11161118 $ q ->render (true )
11171119 );
11181120
@@ -1122,11 +1124,17 @@ public function testWhereVariant()
11221124 ->havingIn ('id ' , [1 , 2 , 3 ])
11231125 ->havingBetween ('time ' , '2012-03-30 ' , '2020-02-24 ' )
11241126 ->havingNotIn ('created ' , [55 , 66 ])
1125- ->havingNotLike ('content ' , '%qwe% ' );
1127+ ->havingNotLike ('content ' , '%qwe% ' )
1128+ ->group ('time ' )
1129+ ->order ('id ' );
11261130
1127- self ::assertSqlEquals (
1128- 'SELECT * FROM "foo" HAVING "id" IN (1, 2, 3) AND "time" BETWEEN \'2012-03-30 \' AND \'2020-02-24 \' '
1129- . 'AND "created" NOT IN (55, 66) AND "content" NOT LIKE \'%qwe% \'' ,
1131+ self ::assertSqlFormatEquals (
1132+ <<<SQL
1133+ SELECT * FROM "foo" GROUP BY "time"
1134+ HAVING "id" IN (1, 2, 3) AND "time" BETWEEN '2012-03-30'
1135+ AND '2020-02-24' AND "created" NOT IN (55, 66) AND "content" NOT LIKE '%qwe%'
1136+ ORDER BY "id"
1137+ SQL ,
11301138 $ q ->render (true )
11311139 );
11321140 }
0 commit comments