<commit_before><?php declare(strict_types=1);

namespace WyriHaximus\HtmlCompress\Tests;

use WyriHaximus\HtmlCompress\Factory;
use WyriHaximus\TestUtilities\TestCase;

/**
 * @internal
 */
final class EdgeCasesTest extends TestCase
{
    public function providerEdgeCase(): array
    {
        $dirs = [];

        $items = \glob(__DIR__ . \DIRECTORY_SEPARATOR . 'EdgeCases' . \DIRECTORY_SEPARATOR . '*', \GLOB_ONLYDIR);
        if ($items !== false) {
            foreach ($items as $item) {
                $dirs[$item] = [$item . \DIRECTORY_SEPARATOR];
            }
        }

        return $dirs;
    }

    /**<commit_msg>Add the edgecase name to the test dataprovider<commit_after><?php declare(strict_types=1);

namespace WyriHaximus\HtmlCompress\Tests;

use WyriHaximus\HtmlCompress\Factory;
use WyriHaximus\TestUtilities\TestCase;

/**
 * @internal
 */
final class EdgeCasesTest extends TestCase
{
    public function providerEdgeCase(): array
    {
        $dirs = [];

        $items = \glob(__DIR__ . \DIRECTORY_SEPARATOR . 'EdgeCases' . \DIRECTORY_SEPARATOR . '*', \GLOB_ONLYDIR);
        if ($items !== false) {
            foreach ($items as $item) {
                $item = $item;
                $itemName = \explode(\DIRECTORY_SEPARATOR, $item);
                $itemName = \array_pop($itemName);
                $dirs[$itemName] = [$item . \DIRECTORY_SEPARATOR];
            }
        }

        return $dirs;
    }

    /**
{'fraction_non_alphanumeric': 0.1313969571230982, 'fraction_numerical': 0.0013831258644536654, 'mean_word_length': 2.3573085846867747, 'pattern_counts': {'":': 0, '<': 5, '<?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': '6239444', 'n_tokens_mistral': 476, 'n_tokens_neox': 456, 'n_words': 88}