Add list user command

This commit is contained in:
Nicolas Hart
2017-07-30 22:04:29 +02:00
parent 882da5c5eb
commit af31cfed76
2 changed files with 69 additions and 0 deletions

View File

@ -0,0 +1,26 @@
<?php
namespace Tests\Wallabag\CoreBundle\Command;
use Symfony\Bundle\FrameworkBundle\Console\Application;
use Symfony\Component\Console\Tester\CommandTester;
use Tests\Wallabag\CoreBundle\WallabagCoreTestCase;
use Wallabag\CoreBundle\Command\ListUserCommand;
class ListUserCommandTest extends WallabagCoreTestCase
{
public function testRunListUserCommand()
{
$application = new Application($this->getClient()->getKernel());
$application->add(new ListUserCommand());
$command = $application->find('wallabag:user:list');
$tester = new CommandTester($command);
$tester->execute([
'command' => $command->getName(),
]);
$this->assertContains('3 user(s) displayed.', $tester->getDisplay());
}
}