N98\Magento\Command\Design\DemoNoticeCommandTest::testExecute PHP Method

testExecute() public method

public testExecute ( )
    public function testExecute()
    {
        $application = $this->getApplication();
        $application->add(new DemoNoticeCommand());
        $application->setAutoExit(false);
        $command = $this->getApplication()->find('design:demo-notice');
        $commandTester = new CommandTester($command);
        $commandTester->execute(array('command' => $command->getName(), 'store' => 'admin', '--on' => true));
        $this->assertRegExp('/Demo Notice enabled/', $commandTester->getDisplay());
        $commandTester = new CommandTester($command);
        $commandTester->execute(array('command' => $command->getName(), 'store' => 'admin', '--off' => true));
        $this->assertRegExp('/Demo Notice disabled/', $commandTester->getDisplay());
    }
DemoNoticeCommandTest