public function testRun()
{
$app = $this->getApp();
$runner = $this->getMockBuilder(PackageManager::class)->setMethods(['requirePackage'])->setConstructorArgs([$app])->getMock();
$runner->expects($this->any())->method('requirePackage')->will($this->returnValue(0));
$app['extend.manager'] = $runner;
$command = new ExtensionsInstall($app);
$tester = new CommandTester($command);
$tester->execute(['name' => 'test', 'version' => '1.0']);
$result = $tester->getDisplay();
$this->assertRegExp('/Starting install of test:1.0… \\[DONE\\]/', trim($result));
}