<commit_before><?php
namespace atk4\dsql\tests;
use atk4\dsql\Query;
use atk4\dsql\Expression;



class dbSelectTest extends \PHPUnit_Extensions_Database_TestCase
{
    protected $pdo;
    function __construct()
    {
        $this->pdo = new \PDO( $GLOBALS['DB_DSN'], $GLOBALS['DB_USER'], $GLOBALS['DB_PASSWD'] );
        $this->pdo->query('created database if not exists dsql_test');
        $this->pdo->query('create temporary table employee (id int, name text, surname text, retired bool)');
    }
    protected function getConnection()
    {
        return $this->createDefaultDBConnection($this->pdo, $GLOBALS['DB_DBNAME']);
    }
    protected function getDataSet()
    {
        return $this->createFlatXMLDataSet(dirname(__FILE__).'/SelectTest.xml');
    }
    private function q($table = null){
        $q = new Query(['connection'=>$this->pdo]);

        if ($table !== null) {
            $q->table('employee');
        }
        return $q;<commit_msg>fix typo in "create database"<commit_after><?php
namespace atk4\dsql\tests;
use atk4\dsql\Query;
use atk4\dsql\Expression;



class dbSelectTest extends \PHPUnit_Extensions_Database_TestCase
{
    protected $pdo;
    function __construct()
    {
        $this->pdo = new \PDO( $GLOBALS['DB_DSN'], $GLOBALS['DB_USER'], $GLOBALS['DB_PASSWD'] );
        $this->pdo->query('create database if not exists dsql_test');
        $this->pdo->query('create temporary table employee (id int, name text, surname text, retired bool)');
    }
    protected function getConnection()
    {
        return $this->createDefaultDBConnection($this->pdo, $GLOBALS['DB_DBNAME']);
    }
    protected function getDataSet()
    {
        return $this->createFlatXMLDataSet(dirname(__FILE__).'/SelectTest.xml');
    }
    private function q($table = null){
        $q = new Query(['connection'=>$this->pdo]);

        if ($table !== null) {
            $q->table('employee');
        }
        return $q;
{'fraction_non_alphanumeric': 0.15028306742151312, 'fraction_numerical': 0.003088008234688626, 'mean_word_length': 3.198704103671706, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 25, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, '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': '736949', 'n_tokens_mistral': 608, 'n_tokens_neox': 600, 'n_words': 129}