<commit_before><?php

namespace Exporter\Test\Source;

use Exporter\Source\PDOStatementSourceIterator;

class PDOStatementSourceIteratorTest extends \PHPUnit_Framework_TestCase
{

    protected $dbh;

    public function setUp()
    {
        if (is_file('foo.db')) {
            unlink('foo.db');
        }

        $this->dbh = new \PDO('sqlite:foo.db');
        $this->dbh->exec('CREATE TABLE `user` (`id` int(11), `username` varchar(255) NOT NULL, `email` varchar(255) NOT NULL )');

        $data = array(<commit_msg>Fix unit tests failing if sqlite is not present<commit_after><?php

namespace Exporter\Test\Source;

use Exporter\Source\PDOStatementSourceIterator;

class PDOStatementSourceIteratorTest extends \PHPUnit_Framework_TestCase
{

    protected $dbh;

    public function setUp()
    {
        if (!in_array('sqlite', \PDO::getAvailableDrivers())) {
            $this->markTestSkipped('the sqlite extension is not available');
        }

        if (is_file('foo.db')) {
            unlink('foo.db');
        }

        $this->dbh = new \PDO('sqlite:foo.db');
        $this->dbh->exec('CREATE TABLE `user` (`id` int(11), `username` varchar(255) NOT NULL, `email` varchar(255) NOT NULL )');

        $data = array(
{'fraction_non_alphanumeric': 0.14227642276422764, 'fraction_numerical': 0.013008130081300813, 'mean_word_length': 3.117056856187291, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 10, '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': '2559107', 'n_tokens_mistral': 406, 'n_tokens_neox': 379, 'n_words': 86}