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

namespace DavidBadura\Fixtures\Loader;

use DavidBadura\Fixtures\Fixture\FixtureCollection;
use PHPUnit\Framework\TestCase;

/**
 * @author <NAME> <<EMAIL>>
 */
class DirectoryLoaderTest extends TestCase
{

    /**
     * @var DirectoryLoader
     */
    private $loader;

    private $mockLoader;

    public function setUp(): void
    {
        $this->mockLoader = $this->createMock(LoaderInterface::class);
        $this->loader = new DirectoryLoader($this->mockLoader);
    }

    public function testLoadFixturesByPath()
    {
        $files = [];

        $this->mockLoader->expects($this->any())->method('load')
            ->with($this->anything())->will($this->returnCallback(function ($var) use (&$files) {
                $files[] = $var;

                return new FixtureCollection();
            }));

        $path = realpath(__DIR__.'/../TestResources/chainFixtures');

        $this->loader->load($path);

        $this->assertCount(3, $files);
        $this->assertEquals($path.'/groups.json', $files[0]);
        $this->assertEquals($path.'/roles.php', $files[1]);
        $this->assertEquals($path.'/user.yml', $files[2]);
    }
}<commit_msg>fix test on windows<commit_after><?php declare(strict_types=1);

namespace DavidBadura\Fixtures\Loader;

use DavidBadura\Fixtures\Fixture\FixtureCollection;
use PHPUnit\Framework\TestCase;

/**
 * @author <NAME> <<EMAIL>>
 */
class DirectoryLoaderTest extends TestCase
{

    /**
     * @var DirectoryLoader
     */
    private $loader;

    private $mockLoader;

    public function setUp(): void
    {
        $this->mockLoader = $this->createMock(LoaderInterface::class);
        $this->loader = new DirectoryLoader($this->mockLoader);
    }

    public function testLoadFixturesByPath()
    {
        $files = [];

        $this->mockLoader->expects($this->any())->method('load')
            ->with($this->anything())->will($this->returnCallback(function ($var) use (&$files) {
                $files[] = $var;

                return new FixtureCollection();
            }));

        $path = realpath(__DIR__.'/../TestResources/chainFixtures');

        $this->loader->load($path);

        $this->assertCount(3, $files);
        $this->assertContains($path.DIRECTORY_SEPARATOR.'groups.json', $files);
        $this->assertContains($path.DIRECTORY_SEPARATOR.'roles.php', $files);
        $this->assertContains($path.DIRECTORY_SEPARATOR.'user.yml', $files);
    }
}
{'fraction_non_alphanumeric': 0.17016129032258065, 'fraction_numerical': 0.00282258064516129, 'mean_word_length': 2.925632911392405, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 45, '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': '2747967', 'n_tokens_mistral': 751, 'n_tokens_neox': 721, 'n_words': 113}