Files
n98-magerun2/dev/tests/N98/Magento/Command/Database/QueryCommandTest.php
T
Tom Klingenberg bdebdb1753 [FIX] WS fixes
- no newline at the end of file
2015-11-11 01:18:16 +01:00

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());
}
}