Phalcon\Test\Unit\Mvc\Model\Query\BuilderTest::testGroup PHP Method

testGroup() public method

public testGroup ( )
    public function testGroup()
    {
        $this->specify("Query Builders don't work with a GROUP BY statement", function () {
            $di = $this->di;
            $builder = new Builder();
            $phql = $builder->setDi($di)->columns(["name", "SUM(price)"])->from(Robots::class)->groupBy("id, name")->getPhql();
            expect($phql)->equals("SELECT name, SUM(price) FROM [" . Robots::class . "] GROUP BY [id], [name]");
        });
    }