<commit_before><?php

/*
 * This file is part of the symfony package.
 * (c) 2004-2006 <NAME> <<EMAIL>>
 * 
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

$_test_dir = realpath(dirname(__FILE__).'/../..');
require_once($_test_dir.'/../lib/vendor/lime/lime.php');
require_once($_test_dir.'/../lib/util/sfParameterHolder.class.php');
require_once($_test_dir.'/../lib/util/sfToolkit.class.php');
require_once($_test_dir.'/../lib/util/sfYaml.class.php');
require_once($_test_dir.'/../lib/util/spyc.class.php');
require_once($_test_dir.'/../lib/config/sfLoader.class.php');
require_once($_test_dir.'/../lib/config/sfConfig.class.php');
require_once($_test_dir.'/../lib/config/sfConfigHandler.class.php');
require_once($_test_dir.'/../lib/config/sfYamlConfigHandler.class.php');
require_once($_test_dir.'/../lib/config/sfDefineEnvironmentConfigHandler.class.php');

sfConfig::set('sf_symfony_lib_dir', realpath(dirname(__FILE__).'/../../../lib'));

$t = new lime_test(1, new lime_output_color());

// prefix
$handler = new sfDefineEnvironmentConfigHandler();
$handler->initialize(array('prefix' => 'sf_'));

$dir = dirname(__FILE__).DIRECTORY_SEPARATOR.'fixtures'.DIRECTORY_SEPARATOR;

$files = array(
  $dir.'prefix_default.yml',
  $dir.'prefix_all.yml',
);

sfConfig::set('sf_environment', 'prod');

$data = $handler->execute($files);
$data = preg_replace('#date\: \d+/\d+/\d+ \d+\:\d+\:\d+#', '', $data);

$t->is($data, file_get_contents($dir.'prefix_result.php'));
<commit_msg>fixed typo in a test<commit_after><?php

/*
 * This file is part of the symfony package.
 * (c) 2004-2006 <NAME> <<EMAIL>>
 * 
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

$_test_dir = realpath(dirname(__FILE__).'/../..');
require_once($_test_dir.'/../lib/vendor/lime/lime.php');
require_once($_test_dir.'/../lib/util/sfParameterHolder.class.php');
require_once($_test_dir.'/../lib/util/sfToolkit.class.php');
require_once($_test_dir.'/../lib/util/sfYaml.class.php');
require_once($_test_dir.'/../lib/util/Spyc.class.php');
require_once($_test_dir.'/../lib/config/sfLoader.class.php');
require_once($_test_dir.'/../lib/config/sfConfig.class.php');
require_once($_test_dir.'/../lib/config/sfConfigHandler.class.php');
require_once($_test_dir.'/../lib/config/sfYamlConfigHandler.class.php');
require_once($_test_dir.'/../lib/config/sfDefineEnvironmentConfigHandler.class.php');

sfConfig::set('sf_symfony_lib_dir', realpath(dirname(__FILE__).'/../../../lib'));

$t = new lime_test(1, new lime_output_color());

// prefix
$handler = new sfDefineEnvironmentConfigHandler();
$handler->initialize(array('prefix' => 'sf_'));

$dir = dirname(__FILE__).DIRECTORY_SEPARATOR.'fixtures'.DIRECTORY_SEPARATOR;

$files = array(
  $dir.'prefix_default.yml',
  $dir.'prefix_all.yml',
);

sfConfig::set('sf_environment', 'prod');

$data = $handler->execute($files);
$data = preg_replace('#date\: \d+/\d+/\d+ \d+\:\d+\:\d+#', '', $data);

$t->is($data, file_get_contents($dir.'prefix_result.php'));

{'fraction_non_alphanumeric': 0.2181004157339303, 'fraction_numerical': 0.005756315957787016, 'mean_word_length': 5.169625246548324, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 17, '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': '4765250', 'n_tokens_mistral': 1119, 'n_tokens_neox': 1088, 'n_words': 152}