<commit_before><?php
date_default_timezone_set('Europe/Amsterdam');
define('APPLICATION_ENV', 'testing');
define('MEMCACHE_HOST', null);
define('MEMCACHE_PORT', null);
$garpRoot = dirname(__FILE__) . '/..';

error_reporting(-1);
ini_set('log_errors', 0);
ini_set('display_startup_errors', 1);
ini_set('display_errors', 'stderr');

require_once $garpRoot . '/application/init.php';

// Grab either the configuration of a host project, where garp3 is installed as dependency,
// or take predefined config.ini used in Garp's own test suite.
$assumedApplicationIniPath = APPLICATION_PATH . '/configs/application.ini';
$application = new Garp_Application(
    APPLICATION_ENV,
    file_exists($assumedApplicationIniPath) ?
        $assumedApplicationIniPath :
        GARP_APPLICATION_PATH . '/../tests/config.ini'
);

$application->bootstrap();<commit_msg>Added BASE_PATH specifically for Garp unit test context<commit_after><?php
date_default_timezone_set('Europe/Amsterdam');
define('APPLICATION_ENV', 'testing');
define('MEMCACHE_HOST', null);
define('MEMCACHE_PORT', null);
$garpRoot = dirname(__FILE__) . '/..';

error_reporting(-1);
ini_set('log_errors', 0);
ini_set('display_startup_errors', 1);
ini_set('display_errors', 'stderr');

define('BASE_PATH', $garpRoot);
require_once $garpRoot . '/application/init.php';

// Grab either the configuration of a host project, where garp3 is installed as dependency,
// or take predefined config.ini used in Garp's own test suite.
$assumedApplicationIniPath = APPLICATION_PATH . '/configs/application.ini';
$application = new Garp_Application(
    APPLICATION_ENV,
    file_exists($assumedApplicationIniPath) ?
        $assumedApplicationIniPath :
        GARP_APPLICATION_PATH . '/../tests/config.ini'
);

$application->bootstrap();
{'fraction_non_alphanumeric': 0.1377952755905512, 'fraction_numerical': 0.0044994375703037125, 'mean_word_length': 5.895348837209302, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '195095', 'n_tokens_mistral': 568, 'n_tokens_neox': 545, 'n_words': 120}