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

namespace Symplify\Monorepo\Tests;

use GitWrapper\GitWrapper;
use Nette\Utils\FileSystem;
use Symfony\Component\Console\Output\OutputInterface;
use Symplify\Monorepo\RepositoryToPackageMerger;

final class RepositoryToPackageMergerTest extends AbstractContainerAwareTestCase
{
    /**
     * @var string
     */
    private const TEMP_MONOREPO_DIRECTORY = __DIR__ . '/RepositoryToPackageMergerSource/TempRepository';

    /**
     * @var GitWrapper
     */
    private $gitWrapper;

    /**
     * @var RepositoryToPackageMerger
     */
    private $repositoryToPackageMerger;

    protected function setUp(): void
    {
        $this->gitWrapper = $this->container->get(GitWrapper::class);
        $this->repositoryToPackageMerger = $this->container->get(RepositoryToPackageMerger::class);

        /** @var OutputInterface $output */
        $output = $this->container->get(OutputInterface::class);
        $output->setVerbosity(OutputInterface::VERBOSITY_QUIET);
    }

    protected function tearDown(): void
    {
        FileSystem::delete(self::TEMP_MONOREPO_DIRECTORY);
    }

    public function testMergeTwoPackages(): void
    {
        $this->gitWrapper->init(self::TEMP_MONOREPO_DIRECTORY);

//        $this->repositoryToPackageMerger->mergeRepositoryToPackage(
//            'https://github.com/Symplify/Monorepo.git',
//            self::TEMP_MONOREPO_DIRECTORY,
//            'packages/Monorepo'
//        );
//
//        $this->assertDirectoryNotExists(self::TEMP_MONOREPO_DIRECTORY . '/src');
//        $this->assertDirectoryExists(self::TEMP_MONOREPO_DIRECTORY . '/packages/Monorepo/src');

        $this->repositoryToPackageMerger->mergeRepositoryToPackage(
            'https://github.com/Symplify/CodingStandard.git',
            self::TEMP_MONOREPO_DIRECTORY,
            'packages/CodingStandard'
        );

        $this->assertDirectoryNotExists(self::TEMP_MONOREPO_DIRECTORY . '/src');
        $this->assertDirectoryExists(self::TEMP_MONOREPO_DIRECTORY . '/packages/CodingStandard/src');
    }
}<commit_msg>use failing part of test<commit_after><?php declare(strict_types=1);

namespace Symplify\Monorepo\Tests;

use GitWrapper\GitWrapper;
use Nette\Utils\FileSystem;
use Symfony\Component\Console\Output\OutputInterface;
use Symplify\Monorepo\RepositoryToPackageMerger;

final class RepositoryToPackageMergerTest extends AbstractContainerAwareTestCase
{
    /**
     * @var string
     */
    private const TEMP_MONOREPO_DIRECTORY = __DIR__ . '/RepositoryToPackageMergerSource/TempRepository';

    /**
     * @var GitWrapper
     */
    private $gitWrapper;

    /**
     * @var RepositoryToPackageMerger
     */
    private $repositoryToPackageMerger;

    protected function setUp(): void
    {
        $this->gitWrapper = $this->container->get(GitWrapper::class);
        $this->repositoryToPackageMerger = $this->container->get(RepositoryToPackageMerger::class);

        /** @var OutputInterface $output */
        $output = $this->container->get(OutputInterface::class);
        $output->setVerbosity(OutputInterface::VERBOSITY_QUIET);
    }

    protected function tearDown(): void
    {
        FileSystem::delete(self::TEMP_MONOREPO_DIRECTORY);
    }

    public function testMergeTwoPackages(): void
    {
        $this->gitWrapper->init(self::TEMP_MONOREPO_DIRECTORY);

        $this->repositoryToPackageMerger->mergeRepositoryToPackage(
            'https://github.com/Symplify/CodingStandard.git',
            self::TEMP_MONOREPO_DIRECTORY,
            'packages/CodingStandard'
        );

        $this->assertDirectoryNotExists(self::TEMP_MONOREPO_DIRECTORY . '/src');
        $this->assertDirectoryExists(self::TEMP_MONOREPO_DIRECTORY . '/packages/CodingStandard/src');
    }
}
{'fraction_non_alphanumeric': 0.12142099681866383, 'fraction_numerical': 0.0005302226935312832, 'mean_word_length': 3.4440518256772674, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 37, 'https://': 3, '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': '2493235', 'n_tokens_mistral': 1123, 'n_tokens_neox': 1094, 'n_words': 140}