mirror of
https://github.com/bdnugget/n98-magerun2.git
synced 2026-11-07 08:57:30 +00:00
39 lines
1.2 KiB
PHP
39 lines
1.2 KiB
PHP
<?php
|
|
|
|
namespace N98\Magento\Command\Developer;
|
|
|
|
use Symfony\Component\Console\Tester\CommandTester;
|
|
use N98\Magento\Command\PHPUnit\TestCase;
|
|
|
|
class TemplateHintsBlocksCommandTest extends TestCase
|
|
{
|
|
public function testExecute()
|
|
{
|
|
$application = $this->getApplication();
|
|
$application->add(new TemplateHintsBlocksCommand());
|
|
$application->setAutoExit(false);
|
|
$command = $this->getApplication()->find('dev:template-hints-blocks');
|
|
|
|
$commandTester = new CommandTester($command);
|
|
$commandTester->execute(
|
|
array(
|
|
'command' => $command->getName(),
|
|
'--on' => true,
|
|
'store' => 'admin',
|
|
)
|
|
);
|
|
$this->assertRegExp('/Template Hints Blocks enabled/', $commandTester->getDisplay());
|
|
|
|
$commandTester = new CommandTester($command);
|
|
$commandTester->execute(
|
|
array(
|
|
'command' => $command->getName(),
|
|
'--off' => true,
|
|
'store' => 'admin',
|
|
)
|
|
);
|
|
|
|
$this->assertRegExp('/Template Hints Blocks disabled/', $commandTester->getDisplay());
|
|
}
|
|
}
|