<commit_before><?php

namespace WsdlToPhp\PackageGenerator\Command;

use WsdlToPhp\PackageGenerator\Tests\TestCase;
use Symfony\Component\Console\Input\ArrayInput;
use Symfony\Component\Console\Output\ConsoleOutput;
use Symfony\Component\Console\Output\OutputInterface;
use WsdlToPhp\PackageGenerator\ConfigurationReader\AbstractYamlReader;

class GeneratePackageCommandTest extends TestCase
{
    /**
     * @expectedException \InvalidArgumentException
     */
    public function testExceptionOnDestination()
    {
        AbstractYamlReader::resetInstances();
        $command = new GeneratePackageCommand('WsdlToPhp');

        $input = new ArrayInput(array(
            '--urlorpath' => self::wsdlBingPath(),
            '--force' => true,
        ));
        $output = new ConsoleOutput(OutputInterface::VERBOSITY_QUIET);

        $command->run($input, $output);
    }
    /**
     * @expectedException \InvalidArgumentException
     */
    public function testExceptionOnComposerName()
    {
        AbstractYamlReader::resetInstances();
        $command = new GeneratePackageCommand('WsdlToPhp');

        $input = new ArrayInput(array(
            '--urlorpath' => self::wsdlBingPath(),
            '--destination' => self::getTestDirectory(),
            '--force' => true,
        ));
        $output = new ConsoleOutput(OutputInterface::VERBOSITY_QUIET);

        $command->run($input, $output);
    }
    /**
     * @expectedException \InvalidArgumentException
     */
    public function testExceptionOnOrigin()
    {
        AbstractYamlReader::resetInstances();
        $command = new GeneratePackageCommand('WsdlToPhp');

        $input = new ArrayInput(array(
            '--destination' => self::getTestDirectory(),
            '--composer-name' => 'wsdltophp/package',
            '--force' => true,
        ));
        $output = new ConsoleOutput(OutputInterface::VERBOSITY_QUIET);

        $command->run($input, $output);
    }
    /**
     *
     */
    public function testDebugMode()
    {
        AbstractYamlReader::resetInstances();
        $command = new GeneratePackageCommand('WsdlToPhp');

        $input = new ArrayInput(array(
            '--urlorpath' => self::wsdlBingPath(),
            '--destination' => self::getTestDirectory() . '/debug/',
            '--composer-name' => 'wsdltophp/package',
            '--gentutorial' => 'true',
            '--genericconstants' => 'false',
        ));
        $output = new ConsoleOutput(OutputInterface::VERBOSITY_VERY_VERBOSE);

        $command->run($input, $output);

        $this->assertFalse(is_dir(self::getTestDirectory() . '/debug/'));
    }
}<commit_msg>code-coverage - disable verbosity<commit_after><?php

namespace WsdlToPhp\PackageGenerator\Command;

use WsdlToPhp\PackageGenerator\Tests\TestCase;
use Symfony\Component\Console\Input\ArrayInput;
use Symfony\Component\Console\Output\ConsoleOutput;
use Symfony\Component\Console\Output\OutputInterface;
use WsdlToPhp\PackageGenerator\ConfigurationReader\AbstractYamlReader;

class GeneratePackageCommandTest extends TestCase
{
    /**
     * @expectedException \InvalidArgumentException
     */
    public function testExceptionOnDestination()
    {
        AbstractYamlReader::resetInstances();
        $command = new GeneratePackageCommand('WsdlToPhp');

        $input = new ArrayInput(array(
            '--urlorpath' => self::wsdlBingPath(),
            '--force' => true,
        ));
        $output = new ConsoleOutput(OutputInterface::VERBOSITY_QUIET);

        $command->run($input, $output);
    }
    /**
     * @expectedException \InvalidArgumentException
     */
    public function testExceptionOnComposerName()
    {
        AbstractYamlReader::resetInstances();
        $command = new GeneratePackageCommand('WsdlToPhp');

        $input = new ArrayInput(array(
            '--urlorpath' => self::wsdlBingPath(),
            '--destination' => self::getTestDirectory(),
            '--force' => true,
        ));
        $output = new ConsoleOutput(OutputInterface::VERBOSITY_QUIET);

        $command->run($input, $output);
    }
    /**
     * @expectedException \InvalidArgumentException
     */
    public function testExceptionOnOrigin()
    {
        AbstractYamlReader::resetInstances();
        $command = new GeneratePackageCommand('WsdlToPhp');

        $input = new ArrayInput(array(
            '--destination' => self::getTestDirectory(),
            '--composer-name' => 'wsdltophp/package',
            '--force' => true,
        ));
        $output = new ConsoleOutput(OutputInterface::VERBOSITY_QUIET);

        $command->run($input, $output);
    }
    /**
     *
     */
    public function testDebugMode()
    {
        AbstractYamlReader::resetInstances();
        $command = new GeneratePackageCommand('WsdlToPhp');

        $input = new ArrayInput(array(
            '--urlorpath' => self::wsdlBingPath(),
            '--destination' => self::getTestDirectory() . '/debug/',
            '--composer-name' => 'wsdltophp/package',
            '--gentutorial' => 'true',
            '--genericconstants' => 'false',
        ));
        $output = new ConsoleOutput(OutputInterface::VERBOSITY_QUIET);

        $command->run($input, $output);

        $this->assertFalse(is_dir(self::getTestDirectory() . '/debug/'));
    }
}
{'fraction_non_alphanumeric': 0.13921901528013583, 'fraction_numerical': 0.0, 'mean_word_length': 2.728551336146273, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 39, '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': '2002562', 'n_tokens_mistral': 1516, 'n_tokens_neox': 1475, 'n_words': 226}