<commit_before><?php

namespace Imjoehaines\Flowder\Test\Integration\Loader;

use PDO;
use PHPUnit\Framework\TestCase;
use Imjoehaines\Flowder\Loader\DirectoryLoader;

class DirectoryLoaderTest extends TestCase
{
    public function testItLoadsFixturesFromAGivenDirectory()
    {
        $expected = [
            'test_data_1' => [
                [
                    'column1' => 1,
                    'column2' => 2,
                    'column3' => 'three',
                ],
            ],
            'test_data_2' => [
                [
                    'column4' => 4,
                    'column5' => 5,
                    'column6' => 'six',
                ],
            ],
            'test_data_3' => [
                [
                    'column7' => 7,
                    'column8' => 8,
                    'column9' => 'nine',
                ],
            ],
        ];

        $loader = new DirectoryLoader();
        $actual = $loader->load(__DIR__ . '/../../data/directory_loader_test/');

        $this->assertSame($expected, $actual);
    }

    public function testItLoadsFixturesFromAGivenDirectoryWithoutTrailingSlash()
    {
        $expected = [
            'test_data_1' => [
                [
                    'column1' => 1,
                    'column2' => 2,
                    'column3' => 'three',
                ],
            ],
            'test_data_2' => [
                [
                    'column4' => 4,
                    'column5' => 5,
                    'column6' => 'six',
                ],
            ],
            'test_data_3' => [
                [
                    'column7' => 7,
                    'column8' => 8,
                    'column9' => 'nine',
                ],
            ],
        ];

        $loader = new DirectoryLoader();
        $actual = $loader->load(__DIR__ . '/../../data/directory_loader_test/');

        $this->assertSame($expected, $actual);
    }
}<commit_msg>Fix WithoutTrailingSlash having a trailing slash<commit_after><?php

namespace Imjoehaines\Flowder\Test\Integration\Loader;

use PDO;
use PHPUnit\Framework\TestCase;
use Imjoehaines\Flowder\Loader\DirectoryLoader;

class DirectoryLoaderTest extends TestCase
{
    public function testItLoadsFixturesFromAGivenDirectory()
    {
        $expected = [
            'test_data_1' => [
                [
                    'column1' => 1,
                    'column2' => 2,
                    'column3' => 'three',
                ],
            ],
            'test_data_2' => [
                [
                    'column4' => 4,
                    'column5' => 5,
                    'column6' => 'six',
                ],
            ],
            'test_data_3' => [
                [
                    'column7' => 7,
                    'column8' => 8,
                    'column9' => 'nine',
                ],
            ],
        ];

        $loader = new DirectoryLoader();
        $actual = $loader->load(__DIR__ . '/../../data/directory_loader_test/');

        $this->assertSame($expected, $actual);
    }

    public function testItLoadsFixturesFromAGivenDirectoryWithoutTrailingSlash()
    {
        $expected = [
            'test_data_1' => [
                [
                    'column1' => 1,
                    'column2' => 2,
                    'column3' => 'three',
                ],
            ],
            'test_data_2' => [
                [
                    'column4' => 4,
                    'column5' => 5,
                    'column6' => 'six',
                ],
            ],
            'test_data_3' => [
                [
                    'column7' => 7,
                    'column8' => 8,
                    'column9' => 'nine',
                ],
            ],
        ];

        $loader = new DirectoryLoader();
        $actual = $loader->load(__DIR__ . '/../../data/directory_loader_test');

        $this->assertSame($expected, $actual);
    }
}
{'fraction_non_alphanumeric': 0.13415245737211634, 'fraction_numerical': 0.01805416248746239, 'mean_word_length': 1.019746835443038, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 59, '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': '3100562', 'n_tokens_mistral': 1148, 'n_tokens_neox': 1043, 'n_words': 163}