<commit_before><?php
/**
 * @file
 * Contains \Drupal\Console\Test\Command\GeneratorConfigFormBaseCommandTest.
 */

namespace Drupal\Console\Test\Command;

use Drupal\Console\Command\GeneratorConfigFormBaseCommand;
use Symfony\Component\Console\Tester\CommandTester;
use Drupal\Console\Test\DataProvider\ConfigFormBaseDataProviderTrait;

class GeneratorConfigFormBaseCommandTest extends GenerateCommandTest
{
    use ConfigFormBaseDataProviderTrait;

    /**
     * ConfigFormBase generator test
     *
     * @param $module
     * @param $class_name
     * @param $form_id
     * @param $services
     * @param $inputs
     * @param $routing
     *
     * @dataProvider commandData
     */
    public function testGenerateConfigFormBase(
        $module,
        $class_name,
        $form_id,
        $services,
        $inputs,
        $routing
    ) {
        $command = new GeneratorConfigFormBaseCommand($this->getHelperSet());
        $command->setHelperSet($this->getHelperSet());
        $command->setGenerator($this->getGenerator());

        $commandTester = new CommandTester($command);

        $code = $commandTester->execute(
            [
              '--module'         =>   $module,
              '--class-name'     =>   $class_name,
              '--form-id'        =>   $form_id,
              '--services'       =>   $services,
              '--inputs'         =>   $inputs,
              '--routing'        =>   $routing
            ],
            ['interactive' => false]
        );

        $this->assertEquals(0, $code);
    }

    private function getGenerator()
    {
        return $this
            ->getMockBuilder('Drupal\Console\Generator\FormGenerator')
            ->disableOriginalConstructor()
            ->setMethods(['generate'])<commit_msg>Moved Generate Form Command to Generate namespace<commit_after><?php
/**
 * @file
 * Contains \Drupal\Console\Test\Command\GeneratorConfigFormBaseCommandTest.
 */

namespace Drupal\Console\Test\Command;

use Drupal\Console\Command\Generate\ConfigFormBaseCommand;
use Symfony\Component\Console\Tester\CommandTester;
use Drupal\Console\Test\DataProvider\ConfigFormBaseDataProviderTrait;

class GeneratorConfigFormBaseCommandTest extends GenerateCommandTest
{
    use ConfigFormBaseDataProviderTrait;

    /**
     * ConfigFormBase generator test
     *
     * @param $module
     * @param $class_name
     * @param $form_id
     * @param $services
     * @param $inputs
     * @param $routing
     *
     * @dataProvider commandData
     */
    public function testGenerateConfigFormBase(
        $module,
        $class_name,
        $form_id,
        $services,
        $inputs,
        $routing
    ) {
        $command = new ConfigFormBaseCommand($this->getHelperSet());
        $command->setHelperSet($this->getHelperSet());
        $command->setGenerator($this->getGenerator());

        $commandTester = new CommandTester($command);

        $code = $commandTester->execute(
            [
              '--module'         =>   $module,
              '--class-name'     =>   $class_name,
              '--form-id'        =>   $form_id,
              '--services'       =>   $services,
              '--inputs'         =>   $inputs,
              '--routing'        =>   $routing
            ],
            ['interactive' => false]
        );

        $this->assertEquals(0, $code);
    }

    private function getGenerator()
    {
        return $this
            ->getMockBuilder('Drupal\Console\Generator\FormGenerator')
            ->disableOriginalConstructor()
            ->setMethods(['generate'])
{'fraction_non_alphanumeric': 0.12231819448314293, 'fraction_numerical': 0.0005572582892170521, 'mean_word_length': 2.0948275862068964, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 37, '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': '5211351', 'n_tokens_mistral': 975, 'n_tokens_neox': 980, 'n_words': 161}