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

namespace Symplify\Statie\Tests\Github;

use Nette\Utils\FileSystem;
use PHPUnit\Framework\TestCase;
use Symplify\Statie\Github\GithubPublishingProcess;
use Symplify\Statie\Utils\FilesystemChecker;
use Throwable;

final class GithubPublishingProcessTest extends TestCase
{
    /**
     * @var string
     */
    private $outputDirectory = __DIR__ . DIRECTORY_SEPARATOR . 'GithubPublishingProcessSource';

    /**
     * @var GithubPublishingProcess
     */
    private $githubPublishingProcess;

    protected function setUp(): void
    {
        $this->githubPublishingProcess = new GithubPublishingProcess(new FilesystemChecker);
    }

    protected function tearDown(): void
    {
        FileSystem::delete($this->outputDirectory . DIRECTORY_SEPARATOR . '.git');
    }

    public function testPushDirectoryContentToRepositoryForNonExistingRepository(): void
    {
        $this->expectException(Throwable::class);
        $this->githubPublishingProcess->pushDirectoryContentToRepository('missing directory', '', '');
    }
}<commit_msg>[Statie] fix test<commit_after><?php declare(strict_types=1);

namespace Symplify\Statie\Tests\Github;

use Nette\Utils\FileSystem;
use PHPUnit\Framework\TestCase;
use Symplify\Statie\Github\GithubPublishingProcess;
use Symplify\Statie\Tests\AbstractContainerAwareTestCase;
use Symplify\Statie\Utils\FilesystemChecker;
use Throwable;

final class GithubPublishingProcessTest extends AbstractContainerAwareTestCase
{
    /**
     * @var string
     */
    private $outputDirectory = __DIR__ . DIRECTORY_SEPARATOR . 'GithubPublishingProcessSource';

    /**
     * @var GithubPublishingProcess
     */
    private $githubPublishingProcess;

    protected function setUp(): void
    {
        $this->githubPublishingProcess = $this->container->get(GithubPublishingProcess::class);
    }

    protected function tearDown(): void
    {
        FileSystem::delete($this->outputDirectory . DIRECTORY_SEPARATOR . '.git');
    }

    public function testPushDirectoryContentToRepositoryForNonExistingRepository(): void
    {
        $this->expectException(Throwable::class);
        $this->githubPublishingProcess->pushDirectoryContentToRepository('missing directory', '', '');
    }
}
{'fraction_non_alphanumeric': 0.10463576158940398, 'fraction_numerical': 0.0008830022075055188, 'mean_word_length': 4.269767441860465, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 15, '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': '5449783', 'n_tokens_mistral': 657, 'n_tokens_neox': 624, 'n_words': 106}