<commit_before><?php
// 
// use PHPUnit\Framework\TestCase;
// use jugger\db\Query;
//
// class HavingTest extends TestCase
// {
//
//     /**
//      *
//      * @dataProvider dataProvider
//      */
//     public function testJoin($table, $on, $sql)
//     {
//
//     }
//
//     public function dataProvider()
//     {
//         return [
//
//         ];
//     }
// }<commit_msg>add tests<commit_after><?php

use PHPUnit\Framework\TestCase;
use jugger\db\Query;

class HavingTest extends TestCase
{

    /**
     *
     * @dataProvider dataProvider
     */
    public function test($sql, $params)
    {
        $q = (new Query())->from('t1')->having($params);
        $this->assertEquals($sql, $q->build());
    }

    public function dataProvider()
    {
        return [
            [
                "SELECT * FROM t1 HAVING COUNT(*) > 123",
                "COUNT(*) > 123"
            ],
        ];
    }
}
{'fraction_non_alphanumeric': 0.18102508178844057, 'fraction_numerical': 0.008724100327153763, 'mean_word_length': 1.5359116022099448, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2322509', 'n_tokens_mistral': 299, 'n_tokens_neox': 288, 'n_words': 53}