<commit_before><?php namespace CodeIgniter\Validation;

use Config\Database;

class UniqueRulesTest extends \CIDatabaseTestCase
{
	protected $refresh =true;

	/**
	 * @var Validation
	 */
	protected $validation;

	protected $config = [
		'ruleSets'      => [
			\CodeIgniter\Validation\Rules::class,
			\CodeIgniter\Validation\FormatRules::class,
			\CodeIgniter\Validation\FileRules::class,
			\CodeIgniter\Validation\CreditCardRules::class,
			\CodeIgniter\Validation\TestRules::class,
		],
		'groupA'        => [
			'foo' => 'required|min_length[5]',
		],
		'groupA_errors' => [
			'foo' => [
				'min_length' => 'Shame, shame. Too short.',
			],
		],
	];

	//--------------------------------------------------------------------

	public function setUp()
	{
		parent::setUp();
		$this->validation = new Validation((object)$this->config, \Config\Services::renderer());<commit_msg>Rules fixes<commit_after><?php namespace CodeIgniter\Validation;

use Config\Database;
use CodeIgniter\Test\CIDatabaseTestCase;

class UniqueRulesTest extends CIDatabaseTestCase
{
	protected $refresh =true;

	/**
	 * @var Validation
	 */
	protected $validation;

	protected $config = [
		'ruleSets'      => [
			\CodeIgniter\Validation\Rules::class,
			\CodeIgniter\Validation\FormatRules::class,
			\CodeIgniter\Validation\FileRules::class,
			\CodeIgniter\Validation\CreditCardRules::class,
			\Tests\Support\Validation\TestRules::class,
		],
		'groupA'        => [
			'foo' => 'required|min_length[5]',
		],
		'groupA_errors' => [
			'foo' => [
				'min_length' => 'Shame, shame. Too short.',
			],
		],
	];

	//--------------------------------------------------------------------

	public function setUp()
	{
		parent::setUp();
		$this->validation = new Validation((object)$this->config, \Config\Services::renderer());
{'fraction_non_alphanumeric': 0.22671840354767184, 'fraction_numerical': 0.0011086474501108647, 'mean_word_length': 2.792016806722689, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 19, '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': '1204895', 'n_tokens_mistral': 622, 'n_tokens_neox': 550, 'n_words': 86}