Files
Phraseanet/tests/Alchemy/Tests/Phrasea/Command/Developper/ComposerInstallTest.php
2015-06-15 19:30:51 +02:00

36 lines
1.1 KiB
PHP

<?php
namespace Alchemy\Tests\Phrasea\Command\Developper;
use Alchemy\Phrasea\Command\Developer\ComposerInstall;
/**
* @group functional
* @group legacy
*/
class ComposerInstallTest extends \PhraseanetTestCase
{
public function testRunWithoutProblems()
{
$input = $this->getMock('Symfony\Component\Console\Input\InputInterface');
$output = $this->getMock('Symfony\Component\Console\Output\OutputInterface');
self::$DI['cli']['driver.composer'] = $this->getMockBuilder('Alchemy\Phrasea\Command\Developer\Utils\ComposerDriver')
->disableOriginalConstructor()
->getMock();
self::$DI['cli']['driver.composer']->expects($this->at(0))
->method('command')
->with('self-update');
self::$DI['cli']['driver.composer']->expects($this->at(1))
->method('command')
->with(['install', '--optimize-autoloader', '--quiet', '--no-interaction', '--dev']);
$command = new ComposerInstall();
$command->setContainer(self::$DI['cli']);
$this->assertEquals(0, $command->execute($input, $output));
}
}