<commit_before><?php
use \Codeception\Configuration;

$I = new InstallTester($scenario);

$config = (!$this->env) ? Configuration::suiteSettings('Install', Configuration::config()) : Configuration::suiteEnvironments('Install')[$this->env];

$db_config = $config['modules']['config']['Db'];

$dsn = $db_config['dsn'];
$dsn = preg_split('/[;:]/', $dsn);
$db_type = array_shift($dsn);
$dbinfo = [
    'type' => (($db_type === 'mysql') ? 'mysqli' : $db_type),
    'user' => $db_config['user'],
    'password' => $db_config['password'],
    'port' => ((isset($db_config['port']) && $db_config['port'])?: 3306),
];
foreach($dsn as $piece) {
    list($key, $val) = explode('=', $piece);
    $dbinfo[$key] = $val;
}

$install_config = array(
    'db_type' => $dbinfo['type'],
    'db_port' => $dbinfo['port'],
    'db_hostname' => $dbinfo['host'],
    'db_userid' => $dbinfo['user'],
    'db_password' => $<PASSWORD>['password'],
    'db_database' => $dbinfo['dbname'],
    'db_table_prefix' =>'xe_',
    'use_rewrite' =>'N',
    'time_zone' =>'0900',
    'email_address' =>'<EMAIL>',
    'password' =>'<PASSWORD>',
    'password2' =>'<PASSWORD>',
    'nick_name' =>'admin',
    'user_id' =>'admin',
    'lang_type' => 'ko',
);

$install_config = '<' . '?php $install_config = ' . var_export($install_config, true) . ';';

$I->wantTo('Auto install');
$I->writeToFile(_XE_PATH_ . 'config/install.config.php', $install_config);
$I->amOnPage('/');

$I->dontSeeElement('//div[@id="progress"]/ul/li');
$I->amOnPage('/index.php?act=dispMemberLoginForm');

$I->fillField('user_id', '<EMAIL>');
$I->submitForm('.login-body form', [
    'act' => 'procMemberLogin',
    'user_id' => '<EMAIL>',
    'password' => '<PASSWORD>',
    'success_return_url' => '/index.php?module=admin'
]);

$I->seeInCurrentUrl('module=admin');
$I->seeElement('#gnbNav');
$I->seeElement('#content .x_page-header');
$I->see('설치 환경 수집 동의', 'h2');

<commit_msg>Fix unit tests again<commit_after><?php
use \Codeception\Configuration;

$I = new InstallTester($scenario);

$config = (!$this->env) ? Configuration::suiteSettings('Install', Configuration::config()) : Configuration::suiteEnvironments('Install')[$this->env];

$db_config = $config['modules']['config']['Db'];

$dsn = $db_config['dsn'];
$dsn = preg_split('/[;:]/', $dsn);
$db_type = array_shift($dsn);
$dbinfo = [
    'type' => (($db_type === 'mysql') ? 'mysqli' : $db_type),
    'user' => $db_config['user'],
    'password' => $db_config['password'],
    'port' => ((isset($db_config['port']) && $db_config['port'])?: 3306),
];
foreach($dsn as $piece) {
    list($key, $val) = explode('=', $piece);
    $dbinfo[$key] = $val;
}

$install_config = array(
    'db_type' => $dbinfo['type'],
    'db_port' => $dbinfo['port'],
    'db_hostname' => $dbinfo['host'],
    'db_userid' => $dbinfo['user'],
    'db_password' => $dbinfo['password'],
    'db_database' => $dbinfo['dbname'],
    'db_table_prefix' =>'xe_',
    'use_rewrite' =>'N',
    'time_zone' =>'<PASSWORD>',
    'email_address' =>'<EMAIL>',
    'password' =>'<PASSWORD>',
    'password2' =>'<PASSWORD>',
    'nick_name' =>'admin',
    'user_id' =>'admin',
    'lang_type' => 'ko',
);

$install_config = '<' . '?php $install_config = ' . var_export($install_config, true) . ';';

$I->wantTo('Auto install');
$I->writeToFile(_XE_PATH_ . 'config/install.config.php', $install_config);
$I->amOnPage('/');

$I->dontSeeElement('//div[@id="progress"]/ul/li');
$I->amOnPage('/index.php?act=dispMemberLoginForm');

$I->fillField('user_id', '<EMAIL>');
$I->submitForm('.login-body form', [
    'act' => 'procMemberLogin',
    'user_id' => '<EMAIL>',
    'password' => '<PASSWORD>',
    'success_return_url' => '/index.php?module=admin'
]);

$I->seeInCurrentUrl('module=admin');
$I->seeElement('#gnbNav');
$I->seeElement('#content .x_page-header');

{'fraction_non_alphanumeric': 0.2636411332633788, 'fraction_numerical': 0.003934942287513116, 'mean_word_length': 5.302479338842975, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 88, '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': '4803405', 'n_tokens_mistral': 1456, 'n_tokens_neox': 1470, 'n_words': 216}