<commit_before><?php

    namespace AloFramework\Session\Tests;

    use AloFramework\Session\MySQLSession as Sess;
    use PDO;

    class MySQLTest extends AbstractSessionTest {

        /** @var PDO */
        private $client;

        function __construct($name = null, array $data = [], $dataName = '') {
            parent::__construct($name, $data, $dataName);

            $this->client = new PDO('mysql:dbname=phpunit;host=localhost;charset=utf8mb4;port=3306', 'root', '');
            $this->client->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
            $this->client->setAttribute(PDO::ATTR_EMULATE_PREPARES, false);
        }

        function testRW() {
            $this->assertFalse(Sess::isActive());

            (new Sess($this->client, $this->cfg))->start();
            $this->assertTrue(Sess::isActive());
            $prefix               = session_id();
            $_SESSION[__METHOD__] = 'foo';
            session_write_close();
            $this->assertFalse(Sess::isActive());

            $this->assertEquals($_SESSION[__METHOD__], 'foo');
            $select =<commit_msg>mysqltest travis fix<commit_after><?php

    namespace AloFramework\Session\Tests;

    use AloFramework\Session\MySQLSession as Sess;
    use PDO;

    class MySQLTest extends AbstractSessionTest {

        /** @var PDO */
        private $client;

        function __construct($name = null, array $data = [], $dataName = '') {
            parent::__construct($name, $data, $dataName);

            $this->client = new PDO('mysql:dbname=phpunit;host=localhost;charset=utf8mb4;port=3306', 'root', '');
            $this->client->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
            $this->client->setAttribute(PDO::ATTR_EMULATE_PREPARES, false);
            $this->client->query('CREATE TABLE IF NOT EXISTS `alo_session` (
                                  `id`     CHAR(128)
                                           CHARACTER SET ascii NOT NULL,
                                  `data`   TEXT                NOT NULL,
                                  `access` TIMESTAMP           NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
                                  PRIMARY KEY (`id`),
                                  KEY `access` (`access`)
                                )
                                  ENGINE = InnoDB
                                  DEFAULT CHARSET = utf8mb4;')->execute();
        }

        function testRW() {
            $this->assertFalse(Sess::isActive());

            (new Sess($this->client, $this->cfg))->start();
            $this->assertTrue(Sess::isActive());
            $prefix               = session_id();
            $_SESSION[__METHOD__] = 'foo';
            session_write_close();
            $this->assertFalse(Sess::isActive());

            $this->assertEquals($_SESSION[__METHOD__], 'foo');
            $select =
{'fraction_non_alphanumeric': 0.1327615780445969, 'fraction_numerical': 0.005831903945111492, 'mean_word_length': 1.8065447545717035, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 30, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 9, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4511782', 'n_tokens_mistral': 819, 'n_tokens_neox': 772, 'n_words': 139}