<commit_before><?php

namespace CarrooiTests\Labels;

use Nette\Configurator;
use Tester\FileMock;
use Tester\TestCase as BaseTestCase;

/**
 *
 * @author <NAME>
 */
class TestCase extends BaseTestCase
{


	/**
	 * @param string $customConfig
	 * @return \Nette\DI\Container
	 */
	protected function createContainer($customConfig = null)
	{
		copy(__DIR__. '/../LabelsApp/Model/database', TEMP_DIR. '/database');

		$config = new Configurator;
		$config->setTempDirectory(TEMP_DIR);
		$config->addParameters(['container' => ['class' => 'SystemContainer_' . md5($customConfig)]]);
		$config->addParameters(['appDir' => __DIR__. '/../LabelsApp']);
		$config->addConfig(__DIR__. '/../LabelsApp/config/config.neon');
		$config->addConfig(FileMock::create('parameters: {databasePath: %tempDir%/database}', 'neon'));

		if ($customConfig) {
			if (pathinfo($customConfig, PATHINFO_EXTENSION) !== 'neon') {
				$customConfig = __DIR__. '/../LabelsApp/config/'. $customConfig. '.neon';
			}

			$config->addConfig($customConfig);
		}

		return $config->createContainer();
	}

}<commit_msg>tests: removed option to set custom config files<commit_after><?php

namespace CarrooiTests\Labels;

use Nette\Configurator;
use Tester\FileMock;
use Tester\TestCase as BaseTestCase;

/**
 *
 * @author <NAME>
 */
class TestCase extends BaseTestCase
{


	/**
	 * @return \Nette\DI\Container
	 */
	protected function createContainer()
	{
		copy(__DIR__. '/../LabelsApp/Model/database', TEMP_DIR. '/database');

		$config = new Configurator;
		$config->setTempDirectory(TEMP_DIR);
		$config->addParameters(['appDir' => __DIR__. '/../LabelsApp']);
		$config->addConfig(__DIR__. '/../LabelsApp/config/config.neon');
		$config->addConfig(FileMock::create('parameters: {databasePath: %tempDir%/database}', 'neon'));

		return $config->createContainer();
	}

}
{'fraction_non_alphanumeric': 0.1794871794871795, 'fraction_numerical': 0.0005455537370430987, 'mean_word_length': 4.643076923076923, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 21, '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': '1199065', 'n_tokens_mistral': 623, 'n_tokens_neox': 585, 'n_words': 109}