N98\Magento\Command\Cache\FlushCommandTest::testExecute PHP Method

testExecute() public method

public testExecute ( )
    public function testExecute()
    {
        $application = $this->getApplication();
        if ($application->getMagentoMajorVersion() == Application::MAGENTO_MAJOR_VERSION_1) {
            $application = $this->getApplication();
            $application->add(new FlushCommand());
            $command = $this->getApplication()->find('cache:flush');
            $commandTester = new CommandTester($command);
            $commandTester->execute(array('command' => $command->getName()));
            $this->assertRegExp('/Cache cleared/', $commandTester->getDisplay());
        }
    }
FlushCommandTest