mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-23 18:03:17 +00:00
Merge branch '3.8'
Conflicts: bin/console composer.lock
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
namespace Alchemy\Tests\Phrasea\Command\Plugin;
|
||||
|
||||
use Alchemy\Phrasea\Command\Plugin\ListPlugin;
|
||||
|
||||
class ListPluginTest extends PluginCommandTestCase
|
||||
{
|
||||
public function testExecute()
|
||||
{
|
||||
$input = $this->getMock('Symfony\Component\Console\Input\InputInterface');
|
||||
$output = $this->getMock('Symfony\Component\Console\Output\OutputInterface');
|
||||
|
||||
$table = $this->getMockBuilder('Symfony\Component\Console\Helper\TableHelper')
|
||||
->disableOriginalConstructor()
|
||||
->getMock();
|
||||
$table->expects($this->once())
|
||||
->method('setHeaders')
|
||||
->will($this->returnSelf());
|
||||
|
||||
$helperSet = $this->getMockBuilder('Symfony\Component\Console\Helper\HelperSet')
|
||||
->disableOriginalConstructor()
|
||||
->getMock();
|
||||
$helperSet->expects($this->once())
|
||||
->method('get')
|
||||
->will($this->returnValue($table));
|
||||
|
||||
$command = new ListPlugin();
|
||||
$command->setContainer(self::$DI['cli']);
|
||||
$command->setHelperSet($helperSet);
|
||||
|
||||
$result = $command->execute($input, $output);
|
||||
|
||||
$this->assertSame(0, $result);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user