<commit_before><?php
namespace Whm\Opm\Client\Test\Integration;

use Whm\Opm\Client\Command\Run;
use Symfony\Component\Console\Tester\CommandTester;

class RunTest extends CommandTest
{

    public function setUp ()
    {
        $configfile = __DIR__ . "/../../config.yml";
        if (! file_exists($configfile)) {
            copy(__DIR__ . "/fixtures/config.yml", $configfile);
        }
    }

    public function testRunCommand ()
    {
        $application = $this->getApplication();
        $application->add(new Run());
        $command = $application->find('run');
        $commandTester = new CommandTester($command);

        $commandTester->execute(array('command' => $command->getName(),'--dryrun' => true));

        $expectedOutput[] = "Executing Command: /usr/bin/php /var/www/opm/src/Whm/Opm/Client/Command/../../../../../bin/client.php messure 1id Opm:HttpArchive 'a:1:{s:3:\"url\";s:20:\"http://www.google.de\";}' --config config.yml\n";
        $expectedOutput[] = "Executing Command: /usr/bin/php /var/www/opm/src/Whm/Opm/Client/Command/../../../../../bin/client.php messure 2id Opm:HttpArchive 'a:1:{s:3:\"url\";s:20:\"http://www.yahoo.com\";}' --config config.yml";

        $result = $commandTester->getDisplay(true);

        foreach ($expectedOutput as $line) {
            $pos = strpos($result, $line);
            if ($pos === false) {
                $this->assertTrue(false, "Command output does not match expected outut.\nExpected: ". $line);
            }
        }
    }
}<commit_msg>Addec $current to unit test assert output.<commit_after><?php
namespace Whm\Opm\Client\Test\Integration;

use Whm\Opm\Client\Command\Run;
use Symfony\Component\Console\Tester\CommandTester;

class RunTest extends CommandTest
{

    public function setUp ()
    {
        $configfile = __DIR__ . "/../../config.yml";
        if (! file_exists($configfile)) {
            copy(__DIR__ . "/fixtures/config.yml", $configfile);
        }
    }

    public function testRunCommand ()
    {
        $application = $this->getApplication();
        $application->add(new Run());
        $command = $application->find('run');
        $commandTester = new CommandTester($command);

        $commandTester->execute(array('command' => $command->getName(),'--dryrun' => true));

        $expectedOutput[] = "Executing Command: /usr/bin/php /var/www/opm/src/Whm/Opm/Client/Command/../../../../../bin/client.php messure 1id Opm:HttpArchive 'a:1:{s:3:\"url\";s:20:\"http://www.google.de\";}' --config config.yml\n";
        $expectedOutput[] = "Executing Command: /usr/bin/php /var/www/opm/src/Whm/Opm/Client/Command/../../../../../bin/client.php messure 2id Opm:HttpArchive 'a:1:{s:3:\"url\";s:20:\"http://www.yahoo.com\";}' --config config.yml";

        $result = $commandTester->getDisplay(true);

        foreach ($expectedOutput as $line) {
            $pos = strpos($result, $line);
            if ($pos === false) {
                $this->assertTrue(false, "Command output does not match expected outut.\nExpected: ". $line."\nCurrent: ".$result);
            }
        }
    }
}

{'fraction_non_alphanumeric': 0.18976949794758446, 'fraction_numerical': 0.006315124723713293, 'mean_word_length': 2.3630573248407645, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 21, 'https://': 0, 'lorem ipsum': 0, 'www.': 8, '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': '3841680', 'n_tokens_mistral': 1036, 'n_tokens_neox': 984, 'n_words': 167}