<commit_before><?php

namespace SchematiconTests;

use Nette\Neon\Neon;
use Schematicon\Validator\Normalizer;
use Tester\Assert;

require_once __DIR__ . '/../bootstrap.php';


$schema = Neon::decode(<<<NEON
full:
	type: map
	properties:
		reference: some_reference
		int:
			type: int
		bool:
			type: bool
		array:
			type: array
			item:
				type: bool|null
		map:
			type: map|null
			properties:
				name:
					type: string
				age:
					type: int|null
		anyOf:
			type: anyOf
			options:
				-
					type: int
				-
					type: string

short:
	type: map
	properties:
		reference: some_reference
		int: int
		bool: bool
		array:
			type: array
			item: bool|null
		map:
			type: map|null
			properties:
				name: string
				age: int|null
		anyOf:
			type: anyOf
			options: [int, string]
NEON
);

$validator = new Normalizer();

Assert::same(
	$schema['full'],<commit_msg>Normalizer: Test updated after anyXX refactor<commit_after><?php

namespace SchematiconTests;

use Nette\Neon\Neon;
use Schematicon\Validator\Normalizer;
use Tester\Assert;

require_once __DIR__ . '/../bootstrap.php';


$schema = Neon::decode(<<<NEON
full:
	type: map
	properties:
		referenced:
			reference: some_reference
		int:
			type: int
		bool:
			type: bool
		array:
			type: array
			item:
				type: bool|null
		map:
			type: map|null
			properties:
				name:
					type: string
				age:
					type: int|null
		anyOf:
			-
				type: int
			-
				type: string

short:
	type: map
	properties:
		referenced:
			reference: some_reference
		int: int
		bool: bool
		array:
			type: array
			item: bool|null
		map:
			type: map|null
			properties:
				name: string
				age: int|null
		anyOf: [int, string]
NEON
);

$validator = new Normalizer();

Assert::same(
	$schema['full'],
{'fraction_non_alphanumeric': 0.11244292237442922, 'fraction_numerical': 0.0, 'mean_word_length': 2.8783185840707963, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 3, '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': '2349773', 'n_tokens_mistral': 786, 'n_tokens_neox': 637, 'n_words': 170}