<commit_before><?php
namespace N98\Magento\Command\Developer\Module;

use Symfony\Component\Console\Tester\CommandTester;
use N98\Magento\Command\PHPUnit\TestCase;

class ListCommandTest extends TestCase
{
    const NONEXISTENT_VENDOR = 'FAKE_VENDOR';
    const MODULE_OCCURENCE_CHECK = 'Magento_Core';

    /**
     * @var $command ListCommand
     */
    protected $command = null;

    public function setUp()
    {
        $application = $this->getApplication();
        $application->add(new ListCommand);

        $this->command = $this->getApplication()->find('dev:module:list');
    }

    /**
     * Test whether the $moduleList property is filled
     */
    public function testBasicList()
    {
        $commandTester = new CommandTester($this->command);
        $commandTester->execute(array('command' => $this->command->getName()));

        $this->assertNotEmpty($this->command->getModuleList());
    }

    /**
     * Sanity test to check whether Magento_Core occurs in the output
     */
    public function testMagentoCoreOccurs()
    {
        $commandTester = new CommandTester($this->command);
        $commandTester->execute(array('command' => $this->command->getName()));

        $this->assertNotFalse(strpos($commandTester->getDisplay(), self::MODULE_OCCURENCE_CHECK));<commit_msg>[BUGFIX] Fixed module list command. The core module does not exist anymore. We now use the catalog module.<commit_after><?php
namespace N98\Magento\Command\Developer\Module;

use Symfony\Component\Console\Tester\CommandTester;
use N98\Magento\Command\PHPUnit\TestCase;

class ListCommandTest extends TestCase
{
    const NONEXISTENT_VENDOR = 'FAKE_VENDOR';
    const MODULE_OCCURENCE_CHECK = 'Magento_Catalog';

    /**
     * @var $command ListCommand
     */
    protected $command = null;

    public function setUp()
    {
        $application = $this->getApplication();
        $application->add(new ListCommand);

        $this->command = $this->getApplication()->find('dev:module:list');
    }

    /**
     * Test whether the $moduleList property is filled
     */
    public function testBasicList()
    {
        $commandTester = new CommandTester($this->command);
        $commandTester->execute(array('command' => $this->command->getName()));

        $this->assertNotEmpty($this->command->getModuleList());
    }

    /**
     * Sanity test to check whether Magento_Core occurs in the output
     */
    public function testMagentoCatalogOccurs()
    {
        $commandTester = new CommandTester($this->command);
        $commandTester->execute(array('command' => $this->command->getName()));

        $this->assertNotFalse(strpos($commandTester->getDisplay(), self::MODULE_OCCURENCE_CHECK));
{'fraction_non_alphanumeric': 0.13389893028402802, 'fraction_numerical': 0.002950940612320177, 'mean_word_length': 3.4532019704433496, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 43, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6889318', 'n_tokens_mistral': 790, 'n_tokens_neox': 782, 'n_words': 152}