mirror of
https://github.com/bdnugget/n98-magerun2.git
synced 2026-11-07 08:57:30 +00:00
29 lines
857 B
PHP
29 lines
857 B
PHP
<?php
|
|
|
|
namespace N98\Magento\Command\Database;
|
|
|
|
use Symfony\Component\Console\Tester\CommandTester;
|
|
use N98\Magento\Command\PHPUnit\TestCase;
|
|
|
|
class QueryCommandTest extends TestCase
|
|
{
|
|
public function testExecute()
|
|
{
|
|
$application = $this->getApplication();
|
|
$application->add(new QueryCommand());
|
|
$command = $this->getApplication()->find('db:query');
|
|
|
|
$commandTester = new CommandTester($command);
|
|
$commandTester->execute(
|
|
array(
|
|
'command' => $command->getName(),
|
|
'query' => 'SHOW TABLES;',
|
|
)
|
|
);
|
|
|
|
$this->assertContains('admin_user', $commandTester->getDisplay());
|
|
$this->assertContains('catalog_product_entity', $commandTester->getDisplay());
|
|
$this->assertContains('wishlist', $commandTester->getDisplay());
|
|
}
|
|
}
|