N98\Magento\Command\Script\Repository\ListCommandTest::testExecute PHP 메소드

testExecute() 공개 메소드

public testExecute ( )
    public function testExecute()
    {
        $application = $this->getApplication();
        $config = $application->getConfig();
        $config['script']['folders'][] = __DIR__ . '/_scripts';
        $application->setConfig($config);
        $application->add(new RunCommand());
        $command = $this->getApplication()->find('script:repo:list');
        $commandTester = new CommandTester($command);
        $commandTester->execute(array('command' => $command->getName()));
        $this->assertContains('Cache Flush Command Test (Hello World)', $commandTester->getDisplay());
        $this->assertContains('Foo command', $commandTester->getDisplay());
        $this->assertContains('Bar command', $commandTester->getDisplay());
    }
ListCommandTest