diff options
| author | Stefan Suhren <suhren.stefan@fh-swf.de> | 2015-05-11 14:59:59 +0200 |
|---|---|---|
| committer | Stefan Suhren <suhren.stefan@fh-swf.de> | 2015-05-11 14:59:59 +0200 |
| commit | fa3a4e440f6daf241772331eaac322f3e0447750 (patch) | |
| tree | ee47dce337a8eecb67da391d6b91768d09d22e6e /vendor/symfony/console/Symfony/Component/Console/Tests | |
| parent | 1bb6c3bc23d08851f6af786f516b3cbc73a6f391 (diff) | |
| download | Catalog-fa3a4e440f6daf241772331eaac322f3e0447750.tar.gz Catalog-fa3a4e440f6daf241772331eaac322f3e0447750.zip | |
Let composer manage the vendor and lock files
Diffstat (limited to 'vendor/symfony/console/Symfony/Component/Console/Tests')
133 files changed, 0 insertions, 8581 deletions
diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/ApplicationTest.php b/vendor/symfony/console/Symfony/Component/Console/Tests/ApplicationTest.php deleted file mode 100644 index 1fa6c64..0000000 --- a/vendor/symfony/console/Symfony/Component/Console/Tests/ApplicationTest.php +++ /dev/null @@ -1,1060 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Tests; - -use Symfony\Component\Console\Application; -use Symfony\Component\Console\Helper\HelperSet; -use Symfony\Component\Console\Helper\FormatterHelper; -use Symfony\Component\Console\Input\ArgvInput; -use Symfony\Component\Console\Input\ArrayInput; -use Symfony\Component\Console\Input\InputInterface; -use Symfony\Component\Console\Input\InputArgument; -use Symfony\Component\Console\Input\InputDefinition; -use Symfony\Component\Console\Input\InputOption; -use Symfony\Component\Console\Output\NullOutput; -use Symfony\Component\Console\Output\Output; -use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Component\Console\Output\StreamOutput; -use Symfony\Component\Console\Tester\ApplicationTester; -use Symfony\Component\Console\Event\ConsoleCommandEvent; -use Symfony\Component\Console\Event\ConsoleExceptionEvent; -use Symfony\Component\Console\Event\ConsoleTerminateEvent; -use Symfony\Component\EventDispatcher\EventDispatcher; - -class ApplicationTest extends \PHPUnit_Framework_TestCase -{ - protected static $fixturesPath; - - public static function setUpBeforeClass() - { - self::$fixturesPath = realpath(__DIR__.'/Fixtures/'); - require_once self::$fixturesPath.'/FooCommand.php'; - require_once self::$fixturesPath.'/Foo1Command.php'; - require_once self::$fixturesPath.'/Foo2Command.php'; - require_once self::$fixturesPath.'/Foo3Command.php'; - require_once self::$fixturesPath.'/Foo4Command.php'; - require_once self::$fixturesPath.'/Foo5Command.php'; - require_once self::$fixturesPath.'/FoobarCommand.php'; - require_once self::$fixturesPath.'/BarBucCommand.php'; - require_once self::$fixturesPath.'/FooSubnamespaced1Command.php'; - require_once self::$fixturesPath.'/FooSubnamespaced2Command.php'; - } - - protected function normalizeLineBreaks($text) - { - return str_replace(PHP_EOL, "\n", $text); - } - - /** - * Replaces the dynamic placeholders of the command help text with a static version. - * The placeholder %command.full_name% includes the script path that is not predictable - * and can not be tested against. - */ - protected function ensureStaticCommandHelp(Application $application) - { - foreach ($application->all() as $command) { - $command->setHelp(str_replace('%command.full_name%', 'app/console %command.name%', $command->getHelp())); - } - } - - public function testConstructor() - { - $application = new Application('foo', 'bar'); - $this->assertEquals('foo', $application->getName(), '__construct() takes the application name as its first argument'); - $this->assertEquals('bar', $application->getVersion(), '__construct() takes the application version as its second argument'); - $this->assertEquals(array('help', 'list'), array_keys($application->all()), '__construct() registered the help and list commands by default'); - } - - public function testSetGetName() - { - $application = new Application(); - $application->setName('foo'); - $this->assertEquals('foo', $application->getName(), '->setName() sets the name of the application'); - } - - public function testSetGetVersion() - { - $application = new Application(); - $application->setVersion('bar'); - $this->assertEquals('bar', $application->getVersion(), '->setVersion() sets the version of the application'); - } - - public function testGetLongVersion() - { - $application = new Application('foo', 'bar'); - $this->assertEquals('<info>foo</info> version <comment>bar</comment>', $application->getLongVersion(), '->getLongVersion() returns the long version of the application'); - } - - public function testHelp() - { - $application = new Application(); - $this->assertStringEqualsFile(self::$fixturesPath.'/application_gethelp.txt', $this->normalizeLineBreaks($application->getHelp()), '->getHelp() returns a help message'); - } - - public function testAll() - { - $application = new Application(); - $commands = $application->all(); - $this->assertInstanceOf('Symfony\\Component\\Console\\Command\\HelpCommand', $commands['help'], '->all() returns the registered commands'); - - $application->add(new \FooCommand()); - $commands = $application->all('foo'); - $this->assertCount(1, $commands, '->all() takes a namespace as its first argument'); - } - - public function testRegister() - { - $application = new Application(); - $command = $application->register('foo'); - $this->assertEquals('foo', $command->getName(), '->register() registers a new command'); - } - - public function testAdd() - { - $application = new Application(); - $application->add($foo = new \FooCommand()); - $commands = $application->all(); - $this->assertEquals($foo, $commands['foo:bar'], '->add() registers a command'); - - $application = new Application(); - $application->addCommands(array($foo = new \FooCommand(), $foo1 = new \Foo1Command())); - $commands = $application->all(); - $this->assertEquals(array($foo, $foo1), array($commands['foo:bar'], $commands['foo:bar1']), '->addCommands() registers an array of commands'); - } - - /** - * @expectedException \LogicException - * @expectedExceptionMessage Command class "Foo5Command" is not correctly initialized. You probably forgot to call the parent constructor. - */ - public function testAddCommandWithEmptyConstructor() - { - $application = new Application(); - $application->add(new \Foo5Command()); - } - - public function testHasGet() - { - $application = new Application(); - $this->assertTrue($application->has('list'), '->has() returns true if a named command is registered'); - $this->assertFalse($application->has('afoobar'), '->has() returns false if a named command is not registered'); - - $application->add($foo = new \FooCommand()); - $this->assertTrue($application->has('afoobar'), '->has() returns true if an alias is registered'); - $this->assertEquals($foo, $application->get('foo:bar'), '->get() returns a command by name'); - $this->assertEquals($foo, $application->get('afoobar'), '->get() returns a command by alias'); - - $application = new Application(); - $application->add($foo = new \FooCommand()); - // simulate --help - $r = new \ReflectionObject($application); - $p = $r->getProperty('wantHelps'); - $p->setAccessible(true); - $p->setValue($application, true); - $command = $application->get('foo:bar'); - $this->assertInstanceOf('Symfony\Component\Console\Command\HelpCommand', $command, '->get() returns the help command if --help is provided as the input'); - } - - public function testSilentHelp() - { - $application = new Application(); - $application->setAutoExit(false); - $application->setCatchExceptions(false); - - $tester = new ApplicationTester($application); - $tester->run(array('-h' => true, '-q' => true), array('decorated' => false)); - - $this->assertEmpty($tester->getDisplay(true)); - } - - /** - * @expectedException \InvalidArgumentException - * @expectedExceptionMessage The command "foofoo" does not exist. - */ - public function testGetInvalidCommand() - { - $application = new Application(); - $application->get('foofoo'); - } - - public function testGetNamespaces() - { - $application = new Application(); - $application->add(new \FooCommand()); - $application->add(new \Foo1Command()); - $this->assertEquals(array('foo'), $application->getNamespaces(), '->getNamespaces() returns an array of unique used namespaces'); - } - - public function testFindNamespace() - { - $application = new Application(); - $application->add(new \FooCommand()); - $this->assertEquals('foo', $application->findNamespace('foo'), '->findNamespace() returns the given namespace if it exists'); - $this->assertEquals('foo', $application->findNamespace('f'), '->findNamespace() finds a namespace given an abbreviation'); - $application->add(new \Foo2Command()); - $this->assertEquals('foo', $application->findNamespace('foo'), '->findNamespace() returns the given namespace if it exists'); - } - - public function testFindNamespaceWithSubnamespaces() - { - $application = new Application(); - $application->add(new \FooSubnamespaced1Command()); - $application->add(new \FooSubnamespaced2Command()); - $this->assertEquals('foo', $application->findNamespace('foo'), '->findNamespace() returns commands even if the commands are only contained in subnamespaces'); - } - - /** - * @expectedException \InvalidArgumentException - * @expectedExceptionMessage The namespace "f" is ambiguous (foo, foo1). - */ - public function testFindAmbiguousNamespace() - { - $application = new Application(); - $application->add(new \BarBucCommand()); - $application->add(new \FooCommand()); - $application->add(new \Foo2Command()); - $application->findNamespace('f'); - } - - /** - * @expectedException \InvalidArgumentException - * @expectedExceptionMessage There are no commands defined in the "bar" namespace. - */ - public function testFindInvalidNamespace() - { - $application = new Application(); - $application->findNamespace('bar'); - } - - /** - * @expectedException \InvalidArgumentException - * @expectedExceptionMessage Command "foo1" is not defined - */ - public function testFindUniqueNameButNamespaceName() - { - $application = new Application(); - $application->add(new \FooCommand()); - $application->add(new \Foo1Command()); - $application->add(new \Foo2Command()); - - $application->find($commandName = 'foo1'); - } - - public function testFind() - { - $application = new Application(); - $application->add(new \FooCommand()); - - $this->assertInstanceOf('FooCommand', $application->find('foo:bar'), '->find() returns a command if its name exists'); - $this->assertInstanceOf('Symfony\Component\Console\Command\HelpCommand', $application->find('h'), '->find() returns a command if its name exists'); - $this->assertInstanceOf('FooCommand', $application->find('f:bar'), '->find() returns a command if the abbreviation for the namespace exists'); - $this->assertInstanceOf('FooCommand', $application->find('f:b'), '->find() returns a command if the abbreviation for the namespace and the command name exist'); - $this->assertInstanceOf('FooCommand', $application->find('a'), '->find() returns a command if the abbreviation exists for an alias'); - } - - /** - * @dataProvider provideAmbiguousAbbreviations - */ - public function testFindWithAmbiguousAbbreviations($abbreviation, $expectedExceptionMessage) - { - $this->setExpectedException('InvalidArgumentException', $expectedExceptionMessage); - - $application = new Application(); - $application->add(new \FooCommand()); - $application->add(new \Foo1Command()); - $application->add(new \Foo2Command()); - - $application->find($abbreviation); - } - - public function provideAmbiguousAbbreviations() - { - return array( - array('f', 'Command "f" is not defined.'), - array('a', 'Command "a" is ambiguous (afoobar, afoobar1 and 1 more).'), - array('foo:b', 'Command "foo:b" is ambiguous (foo:bar, foo:bar1 and 1 more).'), - ); - } - - public function testFindCommandEqualNamespace() - { - $application = new Application(); - $application->add(new \Foo3Command()); - $application->add(new \Foo4Command()); - - $this->assertInstanceOf('Foo3Command', $application->find('foo3:bar'), '->find() returns the good command even if a namespace has same name'); - $this->assertInstanceOf('Foo4Command', $application->find('foo3:bar:toh'), '->find() returns a command even if its namespace equals another command name'); - } - - public function testFindCommandWithAmbiguousNamespacesButUniqueName() - { - $application = new Application(); - $application->add(new \FooCommand()); - $application->add(new \FoobarCommand()); - - $this->assertInstanceOf('FoobarCommand', $application->find('f:f')); - } - - public function testFindCommandWithMissingNamespace() - { - $application = new Application(); - $application->add(new \Foo4Command()); - - $this->assertInstanceOf('Foo4Command', $application->find('f::t')); - } - - /** - * @dataProvider provideInvalidCommandNamesSingle - * @expectedException \InvalidArgumentException - * @expectedExceptionMessage Did you mean this - */ - public function testFindAlternativeExceptionMessageSingle($name) - { - $application = new Application(); - $application->add(new \Foo3Command()); - $application->find($name); - } - - public function provideInvalidCommandNamesSingle() - { - return array( - array('foo3:baR'), - array('foO3:bar'), - ); - } - - public function testFindAlternativeExceptionMessageMultiple() - { - $application = new Application(); - $application->add(new \FooCommand()); - $application->add(new \Foo1Command()); - $application->add(new \Foo2Command()); - - // Command + plural - try { - $application->find('foo:baR'); - $this->fail('->find() throws an \InvalidArgumentException if command does not exist, with alternatives'); - } catch (\Exception $e) { - $this->assertInstanceOf('\InvalidArgumentException', $e, '->find() throws an \InvalidArgumentException if command does not exist, with alternatives'); - $this->assertRegExp('/Did you mean one of these/', $e->getMessage(), '->find() throws an \InvalidArgumentException if command does not exist, with alternatives'); - $this->assertRegExp('/foo1:bar/', $e->getMessage()); - $this->assertRegExp('/foo:bar/', $e->getMessage()); - } - - // Namespace + plural - try { - $application->find('foo2:bar'); - $this->fail('->find() throws an \InvalidArgumentException if command does not exist, with alternatives'); - } catch (\Exception $e) { - $this->assertInstanceOf('\InvalidArgumentException', $e, '->find() throws an \InvalidArgumentException if command does not exist, with alternatives'); - $this->assertRegExp('/Did you mean one of these/', $e->getMessage(), '->find() throws an \InvalidArgumentException if command does not exist, with alternatives'); - $this->assertRegExp('/foo1/', $e->getMessage()); - } - - $application->add(new \Foo3Command()); - $application->add(new \Foo4Command()); - - // Subnamespace + plural - try { - $a = $application->find('foo3:'); - $this->fail('->find() should throw an \InvalidArgumentException if a command is ambiguous because of a subnamespace, with alternatives'); - } catch (\Exception $e) { - $this->assertInstanceOf('\InvalidArgumentException', $e); - $this->assertRegExp('/foo3:bar/', $e->getMessage()); - $this->assertRegExp('/foo3:bar:toh/', $e->getMessage()); - } - } - - public function testFindAlternativeCommands() - { - $application = new Application(); - - $application->add(new \FooCommand()); - $application->add(new \Foo1Command()); - $application->add(new \Foo2Command()); - - try { - $application->find($commandName = 'Unknown command'); - $this->fail('->find() throws an \InvalidArgumentException if command does not exist'); - } catch (\Exception $e) { - $this->assertInstanceOf('\InvalidArgumentException', $e, '->find() throws an \InvalidArgumentException if command does not exist'); - $this->assertEquals(sprintf('Command "%s" is not defined.', $commandName), $e->getMessage(), '->find() throws an \InvalidArgumentException if command does not exist, without alternatives'); - } - - // Test if "bar1" command throw an "\InvalidArgumentException" and does not contain - // "foo:bar" as alternative because "bar1" is too far from "foo:bar" - try { - $application->find($commandName = 'bar1'); - $this->fail('->find() throws an \InvalidArgumentException if command does not exist'); - } catch (\Exception $e) { - $this->assertInstanceOf('\InvalidArgumentException', $e, '->find() throws an \InvalidArgumentException if command does not exist'); - $this->assertRegExp(sprintf('/Command "%s" is not defined./', $commandName), $e->getMessage(), '->find() throws an \InvalidArgumentException if command does not exist, with alternatives'); - $this->assertRegExp('/afoobar1/', $e->getMessage(), '->find() throws an \InvalidArgumentException if command does not exist, with alternative : "afoobar1"'); - $this->assertRegExp('/foo:bar1/', $e->getMessage(), '->find() throws an \InvalidArgumentException if command does not exist, with alternative : "foo:bar1"'); - $this->assertNotRegExp('/foo:bar(?>!1)/', $e->getMessage(), '->find() throws an \InvalidArgumentException if command does not exist, without "foo:bar" alternative'); - } - } - - public function testFindAlternativeCommandsWithAnAlias() - { - $fooCommand = new \FooCommand(); - $fooCommand->setAliases(array('foo2')); - - $application = new Application(); - $application->add($fooCommand); - - $result = $application->find('foo'); - - $this->assertSame($fooCommand, $result); - } - - public function testFindAlternativeNamespace() - { - $application = new Application(); - - $application->add(new \FooCommand()); - $application->add(new \Foo1Command()); - $application->add(new \Foo2Command()); - $application->add(new \foo3Command()); - - try { - $application->find('Unknown-namespace:Unknown-command'); - $this->fail('->find() throws an \InvalidArgumentException if namespace does not exist'); - } catch (\Exception $e) { - $this->assertInstanceOf('\InvalidArgumentException', $e, '->find() throws an \InvalidArgumentException if namespace does not exist'); - $this->assertEquals('There are no commands defined in the "Unknown-namespace" namespace.', $e->getMessage(), '->find() throws an \InvalidArgumentException if namespace does not exist, without alternatives'); - } - - try { - $application->find('foo2:command'); - $this->fail('->find() throws an \InvalidArgumentException if namespace does not exist'); - } catch (\Exception $e) { - $this->assertInstanceOf('\InvalidArgumentException', $e, '->find() throws an \InvalidArgumentException if namespace does not exist'); - $this->assertRegExp('/There are no commands defined in the "foo2" namespace./', $e->getMessage(), '->find() throws an \InvalidArgumentException if namespace does not exist, with alternative'); - $this->assertRegExp('/foo/', $e->getMessage(), '->find() throws an \InvalidArgumentException if namespace does not exist, with alternative : "foo"'); - $this->assertRegExp('/foo1/', $e->getMessage(), '->find() throws an \InvalidArgumentException if namespace does not exist, with alternative : "foo1"'); - $this->assertRegExp('/foo3/', $e->getMessage(), '->find() throws an \InvalidArgumentException if namespace does not exist, with alternative : "foo3"'); - } - } - - public function testFindNamespaceDoesNotFailOnDeepSimilarNamespaces() - { - $application = $this->getMock('Symfony\Component\Console\Application', array('getNamespaces')); - $application->expects($this->once()) - ->method('getNamespaces') - ->will($this->returnValue(array('foo:sublong', 'bar:sub'))); - - $this->assertEquals('foo:sublong', $application->findNamespace('f:sub')); - } - - /** - * @expectedException \InvalidArgumentException - * @expectedExceptionMessage Command "foo::bar" is not defined. - */ - public function testFindWithDoubleColonInNameThrowsException() - { - $application = new Application(); - $application->add(new \FooCommand()); - $application->add(new \Foo4Command()); - $application->find('foo::bar'); - } - - public function testSetCatchExceptions() - { - $application = $this->getMock('Symfony\Component\Console\Application', array('getTerminalWidth')); - $application->setAutoExit(false); - $application->expects($this->any()) - ->method('getTerminalWidth') - ->will($this->returnValue(120)); - $tester = new ApplicationTester($application); - - $application->setCatchExceptions(true); - $tester->run(array('command' => 'foo'), array('decorated' => false)); - $this->assertStringEqualsFile(self::$fixturesPath.'/application_renderexception1.txt', $tester->getDisplay(true), '->setCatchExceptions() sets the catch exception flag'); - - $application->setCatchExceptions(false); - try { - $tester->run(array('command' => 'foo'), array('decorated' => false)); - $this->fail('->setCatchExceptions() sets the catch exception flag'); - } catch (\Exception $e) { - $this->assertInstanceOf('\Exception', $e, '->setCatchExceptions() sets the catch exception flag'); - $this->assertEquals('Command "foo" is not defined.', $e->getMessage(), '->setCatchExceptions() sets the catch exception flag'); - } - } - - /** - * @group legacy - */ - public function testLegacyAsText() - { - $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED); - - $application = new Application(); - $application->add(new \FooCommand()); - $this->ensureStaticCommandHelp($application); - $this->assertStringEqualsFile(self::$fixturesPath.'/application_astext1.txt', $this->normalizeLineBreaks($application->asText()), '->asText() returns a text representation of the application'); - $this->assertStringEqualsFile(self::$fixturesPath.'/application_astext2.txt', $this->normalizeLineBreaks($application->asText('foo')), '->asText() returns a text representation of the application'); - } - - /** - * @group legacy - */ - public function testLegacyAsXml() - { - $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED); - - $application = new Application(); - $application->add(new \FooCommand()); - $this->ensureStaticCommandHelp($application); - $this->assertXmlStringEqualsXmlFile(self::$fixturesPath.'/application_asxml1.txt', $application->asXml(), '->asXml() returns an XML representation of the application'); - $this->assertXmlStringEqualsXmlFile(self::$fixturesPath.'/application_asxml2.txt', $application->asXml('foo'), '->asXml() returns an XML representation of the application'); - } - - public function testRenderException() - { - $application = $this->getMock('Symfony\Component\Console\Application', array('getTerminalWidth')); - $application->setAutoExit(false); - $application->expects($this->any()) - ->method('getTerminalWidth') - ->will($this->returnValue(120)); - $tester = new ApplicationTester($application); - - $tester->run(array('command' => 'foo'), array('decorated' => false)); - $this->assertStringEqualsFile(self::$fixturesPath.'/application_renderexception1.txt', $tester->getDisplay(true), '->renderException() renders a pretty exception'); - - $tester->run(array('command' => 'foo'), array('decorated' => false, 'verbosity' => Output::VERBOSITY_VERBOSE)); - $this->assertContains('Exception trace', $tester->getDisplay(), '->renderException() renders a pretty exception with a stack trace when verbosity is verbose'); - - $tester->run(array('command' => 'list', '--foo' => true), array('decorated' => false)); - $this->assertStringEqualsFile(self::$fixturesPath.'/application_renderexception2.txt', $tester->getDisplay(true), '->renderException() renders the command synopsis when an exception occurs in the context of a command'); - - $application->add(new \Foo3Command()); - $tester = new ApplicationTester($application); - $tester->run(array('command' => 'foo3:bar'), array('decorated' => false)); - $this->assertStringEqualsFile(self::$fixturesPath.'/application_renderexception3.txt', $tester->getDisplay(true), '->renderException() renders a pretty exceptions with previous exceptions'); - - $tester->run(array('command' => 'foo3:bar'), array('decorated' => true)); - $this->assertStringEqualsFile(self::$fixturesPath.'/application_renderexception3decorated.txt', $tester->getDisplay(true), '->renderException() renders a pretty exceptions with previous exceptions'); - - $application = $this->getMock('Symfony\Component\Console\Application', array('getTerminalWidth')); - $application->setAutoExit(false); - $application->expects($this->any()) - ->method('getTerminalWidth') - ->will($this->returnValue(32)); - $tester = new ApplicationTester($application); - - $tester->run(array('command' => 'foo'), array('decorated' => false)); - $this->assertStringEqualsFile(self::$fixturesPath.'/application_renderexception4.txt', $tester->getDisplay(true), '->renderException() wraps messages when they are bigger than the terminal'); - } - - public function testRenderExceptionWithDoubleWidthCharacters() - { - $application = $this->getMock('Symfony\Component\Console\Application', array('getTerminalWidth')); - $application->setAutoExit(false); - $application->expects($this->any()) - ->method('getTerminalWidth') - ->will($this->returnValue(120)); - $application->register('foo')->setCode(function () { - throw new \Exception('エラーメッセージ'); - }); - $tester = new ApplicationTester($application); - - $tester->run(array('command' => 'foo'), array('decorated' => false)); - $this->assertStringEqualsFile(self::$fixturesPath.'/application_renderexception_doublewidth1.txt', $tester->getDisplay(true), '->renderException() renders a pretty exceptions with previous exceptions'); - - $tester->run(array('command' => 'foo'), array('decorated' => true)); - $this->assertStringEqualsFile(self::$fixturesPath.'/application_renderexception_doublewidth1decorated.txt', $tester->getDisplay(true), '->renderException() renders a pretty exceptions with previous exceptions'); - - $application = $this->getMock('Symfony\Component\Console\Application', array('getTerminalWidth')); - $application->setAutoExit(false); - $application->expects($this->any()) - ->method('getTerminalWidth') - ->will($this->returnValue(32)); - $application->register('foo')->setCode(function () { - throw new \Exception('コマンドの実行中にエラーが発生しました。'); - }); - $tester = new ApplicationTester($application); - $tester->run(array('command' => 'foo'), array('decorated' => false)); - $this->assertStringEqualsFile(self::$fixturesPath.'/application_renderexception_doublewidth2.txt', $tester->getDisplay(true), '->renderException() wraps messages when they are bigger than the terminal'); - } - - public function testRun() - { - $application = new Application(); - $application->setAutoExit(false); - $application->setCatchExceptions(false); - $application->add($command = new \Foo1Command()); - $_SERVER['argv'] = array('cli.php', 'foo:bar1'); - - ob_start(); - $application->run(); - ob_end_clean(); - - $this->assertInstanceOf('Symfony\Component\Console\Input\ArgvInput', $command->input, '->run() creates an ArgvInput by default if none is given'); - $this->assertInstanceOf('Symfony\Component\Console\Output\ConsoleOutput', $command->output, '->run() creates a ConsoleOutput by default if none is given'); - - $application = new Application(); - $application->setAutoExit(false); - $application->setCatchExceptions(false); - - $this->ensureStaticCommandHelp($application); - $tester = new ApplicationTester($application); - - $tester->run(array(), array('decorated' => false)); - $this->assertStringEqualsFile(self::$fixturesPath.'/application_run1.txt', $tester->getDisplay(true), '->run() runs the list command if no argument is passed'); - - $tester->run(array('--help' => true), array('decorated' => false)); - $this->assertStringEqualsFile(self::$fixturesPath.'/application_run2.txt', $tester->getDisplay(true), '->run() runs the help command if --help is passed'); - - $tester->run(array('-h' => true), array('decorated' => false)); - $this->assertStringEqualsFile(self::$fixturesPath.'/application_run2.txt', $tester->getDisplay(true), '->run() runs the help command if -h is passed'); - - $tester->run(array('command' => 'list', '--help' => true), array('decorated' => false)); - $this->assertStringEqualsFile(self::$fixturesPath.'/application_run3.txt', $tester->getDisplay(true), '->run() displays the help if --help is passed'); - - $tester->run(array('command' => 'list', '-h' => true), array('decorated' => false)); - $this->assertStringEqualsFile(self::$fixturesPath.'/application_run3.txt', $tester->getDisplay(true), '->run() displays the help if -h is passed'); - - $tester->run(array('--ansi' => true)); - $this->assertTrue($tester->getOutput()->isDecorated(), '->run() forces color output if --ansi is passed'); - - $tester->run(array('--no-ansi' => true)); - $this->assertFalse($tester->getOutput()->isDecorated(), '->run() forces color output to be disabled if --no-ansi is passed'); - - $tester->run(array('--version' => true), array('decorated' => false)); - $this->assertStringEqualsFile(self::$fixturesPath.'/application_run4.txt', $tester->getDisplay(true), '->run() displays the program version if --version is passed'); - - $tester->run(array('-V' => true), array('decorated' => false)); - $this->assertStringEqualsFile(self::$fixturesPath.'/application_run4.txt', $tester->getDisplay(true), '->run() displays the program version if -v is passed'); - - $tester->run(array('command' => 'list', '--quiet' => true)); - $this->assertSame('', $tester->getDisplay(), '->run() removes all output if --quiet is passed'); - - $tester->run(array('command' => 'list', '-q' => true)); - $this->assertSame('', $tester->getDisplay(), '->run() removes all output if -q is passed'); - - $tester->run(array('command' => 'list', '--verbose' => true)); - $this->assertSame(Output::VERBOSITY_VERBOSE, $tester->getOutput()->getVerbosity(), '->run() sets the output to verbose if --verbose is passed'); - - $tester->run(array('command' => 'list', '--verbose' => 1)); - $this->assertSame(Output::VERBOSITY_VERBOSE, $tester->getOutput()->getVerbosity(), '->run() sets the output to verbose if --verbose=1 is passed'); - - $tester->run(array('command' => 'list', '--verbose' => 2)); - $this->assertSame(Output::VERBOSITY_VERY_VERBOSE, $tester->getOutput()->getVerbosity(), '->run() sets the output to very verbose if --verbose=2 is passed'); - - $tester->run(array('command' => 'list', '--verbose' => 3)); - $this->assertSame(Output::VERBOSITY_DEBUG, $tester->getOutput()->getVerbosity(), '->run() sets the output to debug if --verbose=3 is passed'); - - $tester->run(array('command' => 'list', '--verbose' => 4)); - $this->assertSame(Output::VERBOSITY_VERBOSE, $tester->getOutput()->getVerbosity(), '->run() sets the output to verbose if unknown --verbose level is passed'); - - $tester->run(array('command' => 'list', '-v' => true)); - $this->assertSame(Output::VERBOSITY_VERBOSE, $tester->getOutput()->getVerbosity(), '->run() sets the output to verbose if -v is passed'); - - $tester->run(array('command' => 'list', '-vv' => true)); - $this->assertSame(Output::VERBOSITY_VERY_VERBOSE, $tester->getOutput()->getVerbosity(), '->run() sets the output to verbose if -v is passed'); - - $tester->run(array('command' => 'list', '-vvv' => true)); - $this->assertSame(Output::VERBOSITY_DEBUG, $tester->getOutput()->getVerbosity(), '->run() sets the output to verbose if -v is passed'); - - $application = new Application(); - $application->setAutoExit(false); - $application->setCatchExceptions(false); - $application->add(new \FooCommand()); - $tester = new ApplicationTester($application); - - $tester->run(array('command' => 'foo:bar', '--no-interaction' => true), array('decorated' => false)); - $this->assertSame('called'.PHP_EOL, $tester->getDisplay(), '->run() does not call interact() if --no-interaction is passed'); - - $tester->run(array('command' => 'foo:bar', '-n' => true), array('decorated' => false)); - $this->assertSame('called'.PHP_EOL, $tester->getDisplay(), '->run() does not call interact() if -n is passed'); - } - - /** - * Issue #9285 - * - * If the "verbose" option is just before an argument in ArgvInput, - * an argument value should not be treated as verbosity value. - * This test will fail with "Not enough arguments." if broken - */ - public function testVerboseValueNotBreakArguments() - { - $application = new Application(); - $application->setAutoExit(false); - $application->setCatchExceptions(false); - $application->add(new \FooCommand()); - - $output = new StreamOutput(fopen('php://memory', 'w', false)); - - $input = new ArgvInput(array('cli.php', '-v', 'foo:bar')); - $application->run($input, $output); - - $input = new ArgvInput(array('cli.php', '--verbose', 'foo:bar')); - $application->run($input, $output); - } - - public function testRunReturnsIntegerExitCode() - { - $exception = new \Exception('', 4); - - $application = $this->getMock('Symfony\Component\Console\Application', array('doRun')); - $application->setAutoExit(false); - $application->expects($this->once()) - ->method('doRun') - ->will($this->throwException($exception)); - - $exitCode = $application->run(new ArrayInput(array()), new NullOutput()); - - $this->assertSame(4, $exitCode, '->run() returns integer exit code extracted from raised exception'); - } - - public function testRunReturnsExitCodeOneForExceptionCodeZero() - { - $exception = new \Exception('', 0); - - $application = $this->getMock('Symfony\Component\Console\Application', array('doRun')); - $application->setAutoExit(false); - $application->expects($this->once()) - ->method('doRun') - ->will($this->throwException($exception)); - - $exitCode = $application->run(new ArrayInput(array()), new NullOutput()); - - $this->assertSame(1, $exitCode, '->run() returns exit code 1 when exception code is 0'); - } - - /** - * @expectedException \LogicException - * @dataProvider getAddingAlreadySetDefinitionElementData - */ - public function testAddingAlreadySetDefinitionElementData($def) - { - $application = new Application(); - $application->setAutoExit(false); - $application->setCatchExceptions(false); - $application - ->register('foo') - ->setDefinition(array($def)) - ->setCode(function (InputInterface $input, OutputInterface $output) {}) - ; - - $input = new ArrayInput(array('command' => 'foo')); - $output = new NullOutput(); - $application->run($input, $output); - } - - public function getAddingAlreadySetDefinitionElementData() - { - return array( - array(new InputArgument('command', InputArgument::REQUIRED)), - array(new InputOption('quiet', '', InputOption::VALUE_NONE)), - array(new InputOption('query', 'q', InputOption::VALUE_NONE)), - ); - } - - public function testGetDefaultHelperSetReturnsDefaultValues() - { - $application = new Application(); - $application->setAutoExit(false); - $application->setCatchExceptions(false); - - $helperSet = $application->getHelperSet(); - - $this->assertTrue($helperSet->has('formatter')); - $this->assertTrue($helperSet->has('dialog')); - $this->assertTrue($helperSet->has('progress')); - } - - public function testAddingSingleHelperSetOverwritesDefaultValues() - { - $application = new Application(); - $application->setAutoExit(false); - $application->setCatchExceptions(false); - - $application->setHelperSet(new HelperSet(array(new FormatterHelper()))); - - $helperSet = $application->getHelperSet(); - - $this->assertTrue($helperSet->has('formatter')); - - // no other default helper set should be returned - $this->assertFalse($helperSet->has('dialog')); - $this->assertFalse($helperSet->has('progress')); - } - - public function testOverwritingDefaultHelperSetOverwritesDefaultValues() - { - $application = new CustomApplication(); - $application->setAutoExit(false); - $application->setCatchExceptions(false); - - $application->setHelperSet(new HelperSet(array(new FormatterHelper()))); - - $helperSet = $application->getHelperSet(); - - $this->assertTrue($helperSet->has('formatter')); - - // no other default helper set should be returned - $this->assertFalse($helperSet->has('dialog')); - $this->assertFalse($helperSet->has('progress')); - } - - public function testGetDefaultInputDefinitionReturnsDefaultValues() - { - $application = new Application(); - $application->setAutoExit(false); - $application->setCatchExceptions(false); - - $inputDefinition = $application->getDefinition(); - - $this->assertTrue($inputDefinition->hasArgument('command')); - - $this->assertTrue($inputDefinition->hasOption('help')); - $this->assertTrue($inputDefinition->hasOption('quiet')); - $this->assertTrue($inputDefinition->hasOption('verbose')); - $this->assertTrue($inputDefinition->hasOption('version')); - $this->assertTrue($inputDefinition->hasOption('ansi')); - $this->assertTrue($inputDefinition->hasOption('no-ansi')); - $this->assertTrue($inputDefinition->hasOption('no-interaction')); - } - - public function testOverwritingDefaultInputDefinitionOverwritesDefaultValues() - { - $application = new CustomApplication(); - $application->setAutoExit(false); - $application->setCatchExceptions(false); - - $inputDefinition = $application->getDefinition(); - - // check whether the default arguments and options are not returned any more - $this->assertFalse($inputDefinition->hasArgument('command')); - - $this->assertFalse($inputDefinition->hasOption('help')); - $this->assertFalse($inputDefinition->hasOption('quiet')); - $this->assertFalse($inputDefinition->hasOption('verbose')); - $this->assertFalse($inputDefinition->hasOption('version')); - $this->assertFalse($inputDefinition->hasOption('ansi')); - $this->assertFalse($inputDefinition->hasOption('no-ansi')); - $this->assertFalse($inputDefinition->hasOption('no-interaction')); - - $this->assertTrue($inputDefinition->hasOption('custom')); - } - - public function testSettingCustomInputDefinitionOverwritesDefaultValues() - { - $application = new Application(); - $application->setAutoExit(false); - $application->setCatchExceptions(false); - - $application->setDefinition(new InputDefinition(array(new InputOption('--custom', '-c', InputOption::VALUE_NONE, 'Set the custom input definition.')))); - - $inputDefinition = $application->getDefinition(); - - // check whether the default arguments and options are not returned any more - $this->assertFalse($inputDefinition->hasArgument('command')); - - $this->assertFalse($inputDefinition->hasOption('help')); - $this->assertFalse($inputDefinition->hasOption('quiet')); - $this->assertFalse($inputDefinition->hasOption('verbose')); - $this->assertFalse($inputDefinition->hasOption('version')); - $this->assertFalse($inputDefinition->hasOption('ansi')); - $this->assertFalse($inputDefinition->hasOption('no-ansi')); - $this->assertFalse($inputDefinition->hasOption('no-interaction')); - - $this->assertTrue($inputDefinition->hasOption('custom')); - } - - public function testRunWithDispatcher() - { - $application = new Application(); - $application->setAutoExit(false); - $application->setDispatcher($this->getDispatcher()); - - $application->register('foo')->setCode(function (InputInterface $input, OutputInterface $output) { - $output->write('foo.'); - }); - - $tester = new ApplicationTester($application); - $tester->run(array('command' => 'foo')); - $this->assertEquals('before.foo.after.', $tester->getDisplay()); - } - - /** - * @expectedException \LogicException - * @expectedExceptionMessage caught - */ - public function testRunWithExceptionAndDispatcher() - { - $application = new Application(); - $application->setDispatcher($this->getDispatcher()); - $application->setAutoExit(false); - $application->setCatchExceptions(false); - - $application->register('foo')->setCode(function (InputInterface $input, OutputInterface $output) { - throw new \RuntimeException('foo'); - }); - - $tester = new ApplicationTester($application); - $tester->run(array('command' => 'foo')); - } - - public function testRunDispatchesAllEventsWithException() - { - $application = new Application(); - $application->setDispatcher($this->getDispatcher()); - $application->setAutoExit(false); - - $application->register('foo')->setCode(function (InputInterface $input, OutputInterface $output) { - $output->write('foo.'); - - throw new \RuntimeException('foo'); - }); - - $tester = new ApplicationTester($application); - $tester->run(array('command' => 'foo')); - $this->assertContains('before.foo.after.caught.', $tester->getDisplay()); - } - - public function testRunWithDispatcherSkippingCommand() - { - $application = new Application(); - $application->setDispatcher($this->getDispatcher(true)); - $application->setAutoExit(false); - - $application->register('foo')->setCode(function (InputInterface $input, OutputInterface $output) { - $output->write('foo.'); - }); - - $tester = new ApplicationTester($application); - $exitCode = $tester->run(array('command' => 'foo')); - $this->assertContains('before.after.', $tester->getDisplay()); - $this->assertEquals(ConsoleCommandEvent::RETURN_CODE_DISABLED, $exitCode); - } - - public function testTerminalDimensions() - { - $application = new Application(); - $originalDimensions = $application->getTerminalDimensions(); - $this->assertCount(2, $originalDimensions); - - $width = 80; - if ($originalDimensions[0] == $width) { - $width = 100; - } - - $application->setTerminalDimensions($width, 80); - $this->assertSame(array($width, 80), $application->getTerminalDimensions()); - } - - protected function getDispatcher($skipCommand = false) - { - $dispatcher = new EventDispatcher(); - $dispatcher->addListener('console.command', function (ConsoleCommandEvent $event) use ($skipCommand) { - $event->getOutput()->write('before.'); - - if ($skipCommand) { - $event->disableCommand(); - } - }); - $dispatcher->addListener('console.terminate', function (ConsoleTerminateEvent $event) use ($skipCommand) { - $event->getOutput()->write('after.'); - - if (!$skipCommand) { - $event->setExitCode(113); - } - }); - $dispatcher->addListener('console.exception', function (ConsoleExceptionEvent $event) { - $event->getOutput()->writeln('caught.'); - - $event->setException(new \LogicException('caught.', $event->getExitCode(), $event->getException())); - }); - - return $dispatcher; - } - - public function testSetRunCustomDefaultCommand() - { - $command = new \FooCommand(); - - $application = new Application(); - $application->setAutoExit(false); - $application->add($command); - $application->setDefaultCommand($command->getName()); - - $tester = new ApplicationTester($application); - $tester->run(array()); - $this->assertEquals('interact called'.PHP_EOL.'called'.PHP_EOL, $tester->getDisplay(), 'Application runs the default set command if different from \'list\' command'); - - $application = new CustomDefaultCommandApplication(); - $application->setAutoExit(false); - - $tester = new ApplicationTester($application); - $tester->run(array()); - - $this->assertEquals('interact called'.PHP_EOL.'called'.PHP_EOL, $tester->getDisplay(), 'Application runs the default set command if different from \'list\' command'); - } - - public function testCanCheckIfTerminalIsInteractive() - { - if (!function_exists('posix_isatty')) { - $this->markTestSkipped('posix_isatty function is required'); - } - - $application = new CustomDefaultCommandApplication(); - $application->setAutoExit(false); - - $tester = new ApplicationTester($application); - $tester->run(array('command' => 'help')); - - $this->assertFalse($tester->getInput()->hasParameterOption(array('--no-interaction', '-n'))); - - $inputStream = $application->getHelperSet()->get('question')->getInputStream(); - $this->assertEquals($tester->getInput()->isInteractive(), @posix_isatty($inputStream)); - } -} - -class CustomApplication extends Application -{ - /** - * Overwrites the default input definition. - * - * @return InputDefinition An InputDefinition instance - */ - protected function getDefaultInputDefinition() - { - return new InputDefinition(array(new InputOption('--custom', '-c', InputOption::VALUE_NONE, 'Set the custom input definition.'))); - } - - /** - * Gets the default helper set with the helpers that should always be available. - * - * @return HelperSet A HelperSet instance - */ - protected function getDefaultHelperSet() - { - return new HelperSet(array(new FormatterHelper())); - } -} - -class CustomDefaultCommandApplication extends Application -{ - /** - * Overwrites the constructor in order to set a different default command. - */ - public function __construct() - { - parent::__construct(); - - $command = new \FooCommand(); - $this->add($command); - $this->setDefaultCommand($command->getName()); - } -} diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Command/CommandTest.php b/vendor/symfony/console/Symfony/Component/Console/Tests/Command/CommandTest.php deleted file mode 100644 index c35617d..0000000 --- a/vendor/symfony/console/Symfony/Component/Console/Tests/Command/CommandTest.php +++ /dev/null @@ -1,348 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Tests\Command; - -use Symfony\Component\Console\Command\Command; -use Symfony\Component\Console\Helper\FormatterHelper; -use Symfony\Component\Console\Application; -use Symfony\Component\Console\Input\InputDefinition; -use Symfony\Component\Console\Input\InputArgument; -use Symfony\Component\Console\Input\InputOption; -use Symfony\Component\Console\Input\InputInterface; -use Symfony\Component\Console\Input\StringInput; -use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Component\Console\Output\NullOutput; -use Symfony\Component\Console\Tester\CommandTester; - -class CommandTest extends \PHPUnit_Framework_TestCase -{ - protected static $fixturesPath; - - public static function setUpBeforeClass() - { - self::$fixturesPath = __DIR__.'/../Fixtures/'; - require_once self::$fixturesPath.'/TestCommand.php'; - } - - public function testConstructor() - { - $command = new Command('foo:bar'); - $this->assertEquals('foo:bar', $command->getName(), '__construct() takes the command name as its first argument'); - } - - /** - * @expectedException \LogicException - * @expectedExceptionMessage The command defined in "Symfony\Component\Console\Command\Command" cannot have an empty name. - */ - public function testCommandNameCannotBeEmpty() - { - new Command(); - } - - public function testSetApplication() - { - $application = new Application(); - $command = new \TestCommand(); - $command->setApplication($application); - $this->assertEquals($application, $command->getApplication(), '->setApplication() sets the current application'); - } - - public function testSetGetDefinition() - { - $command = new \TestCommand(); - $ret = $command->setDefinition($definition = new InputDefinition()); - $this->assertEquals($command, $ret, '->setDefinition() implements a fluent interface'); - $this->assertEquals($definition, $command->getDefinition(), '->setDefinition() sets the current InputDefinition instance'); - $command->setDefinition(array(new InputArgument('foo'), new InputOption('bar'))); - $this->assertTrue($command->getDefinition()->hasArgument('foo'), '->setDefinition() also takes an array of InputArguments and InputOptions as an argument'); - $this->assertTrue($command->getDefinition()->hasOption('bar'), '->setDefinition() also takes an array of InputArguments and InputOptions as an argument'); - $command->setDefinition(new InputDefinition()); - } - - public function testAddArgument() - { - $command = new \TestCommand(); - $ret = $command->addArgument('foo'); - $this->assertEquals($command, $ret, '->addArgument() implements a fluent interface'); - $this->assertTrue($command->getDefinition()->hasArgument('foo'), '->addArgument() adds an argument to the command'); - } - - public function testAddOption() - { - $command = new \TestCommand(); - $ret = $command->addOption('foo'); - $this->assertEquals($command, $ret, '->addOption() implements a fluent interface'); - $this->assertTrue($command->getDefinition()->hasOption('foo'), '->addOption() adds an option to the command'); - } - - public function testGetNamespaceGetNameSetName() - { - $command = new \TestCommand(); - $this->assertEquals('namespace:name', $command->getName(), '->getName() returns the command name'); - $command->setName('foo'); - $this->assertEquals('foo', $command->getName(), '->setName() sets the command name'); - - $ret = $command->setName('foobar:bar'); - $this->assertEquals($command, $ret, '->setName() implements a fluent interface'); - $this->assertEquals('foobar:bar', $command->getName(), '->setName() sets the command name'); - } - - /** - * @dataProvider provideInvalidCommandNames - */ - public function testInvalidCommandNames($name) - { - $this->setExpectedException('InvalidArgumentException', sprintf('Command name "%s" is invalid.', $name)); - - $command = new \TestCommand(); - $command->setName($name); - } - - public function provideInvalidCommandNames() - { - return array( - array(''), - array('foo:'), - ); - } - - public function testGetSetDescription() - { - $command = new \TestCommand(); - $this->assertEquals('description', $command->getDescription(), '->getDescription() returns the description'); - $ret = $command->setDescription('description1'); - $this->assertEquals($command, $ret, '->setDescription() implements a fluent interface'); - $this->assertEquals('description1', $command->getDescription(), '->setDescription() sets the description'); - } - - public function testGetSetHelp() - { - $command = new \TestCommand(); - $this->assertEquals('help', $command->getHelp(), '->getHelp() returns the help'); - $ret = $command->setHelp('help1'); - $this->assertEquals($command, $ret, '->setHelp() implements a fluent interface'); - $this->assertEquals('help1', $command->getHelp(), '->setHelp() sets the help'); - } - - public function testGetProcessedHelp() - { - $command = new \TestCommand(); - $command->setHelp('The %command.name% command does... Example: php %command.full_name%.'); - $this->assertContains('The namespace:name command does...', $command->getProcessedHelp(), '->getProcessedHelp() replaces %command.name% correctly'); - $this->assertNotContains('%command.full_name%', $command->getProcessedHelp(), '->getProcessedHelp() replaces %command.full_name%'); - } - - public function testGetSetAliases() - { - $command = new \TestCommand(); - $this->assertEquals(array('name'), $command->getAliases(), '->getAliases() returns the aliases'); - $ret = $command->setAliases(array('name1')); - $this->assertEquals($command, $ret, '->setAliases() implements a fluent interface'); - $this->assertEquals(array('name1'), $command->getAliases(), '->setAliases() sets the aliases'); - } - - public function testGetSynopsis() - { - $command = new \TestCommand(); - $command->addOption('foo'); - $command->addArgument('foo'); - $this->assertEquals('namespace:name [--foo] [foo]', $command->getSynopsis(), '->getSynopsis() returns the synopsis'); - } - - public function testGetHelper() - { - $application = new Application(); - $command = new \TestCommand(); - $command->setApplication($application); - $formatterHelper = new FormatterHelper(); - $this->assertEquals($formatterHelper->getName(), $command->getHelper('formatter')->getName(), '->getHelper() returns the correct helper'); - } - - public function testGet() - { - $application = new Application(); - $command = new \TestCommand(); - $command->setApplication($application); - $formatterHelper = new FormatterHelper(); - $this->assertEquals($formatterHelper->getName(), $command->getHelper('formatter')->getName(), '->__get() returns the correct helper'); - } - - public function testMergeApplicationDefinition() - { - $application1 = new Application(); - $application1->getDefinition()->addArguments(array(new InputArgument('foo'))); - $application1->getDefinition()->addOptions(array(new InputOption('bar'))); - $command = new \TestCommand(); - $command->setApplication($application1); - $command->setDefinition($definition = new InputDefinition(array(new InputArgument('bar'), new InputOption('foo')))); - - $r = new \ReflectionObject($command); - $m = $r->getMethod('mergeApplicationDefinition'); - $m->setAccessible(true); - $m->invoke($command); - $this->assertTrue($command->getDefinition()->hasArgument('foo'), '->mergeApplicationDefinition() merges the application arguments and the command arguments'); - $this->assertTrue($command->getDefinition()->hasArgument('bar'), '->mergeApplicationDefinition() merges the application arguments and the command arguments'); - $this->assertTrue($command->getDefinition()->hasOption('foo'), '->mergeApplicationDefinition() merges the application options and the command options'); - $this->assertTrue($command->getDefinition()->hasOption('bar'), '->mergeApplicationDefinition() merges the application options and the command options'); - - $m->invoke($command); - $this->assertEquals(3, $command->getDefinition()->getArgumentCount(), '->mergeApplicationDefinition() does not try to merge twice the application arguments and options'); - } - - public function testMergeApplicationDefinitionWithoutArgsThenWithArgsAddsArgs() - { - $application1 = new Application(); - $application1->getDefinition()->addArguments(array(new InputArgument('foo'))); - $application1->getDefinition()->addOptions(array(new InputOption('bar'))); - $command = new \TestCommand(); - $command->setApplication($application1); - $command->setDefinition($definition = new InputDefinition(array())); - - $r = new \ReflectionObject($command); - $m = $r->getMethod('mergeApplicationDefinition'); - $m->setAccessible(true); - $m->invoke($command, false); - $this->assertTrue($command->getDefinition()->hasOption('bar'), '->mergeApplicationDefinition(false) merges the application and the command options'); - $this->assertFalse($command->getDefinition()->hasArgument('foo'), '->mergeApplicationDefinition(false) does not merge the application arguments'); - - $m->invoke($command, true); - $this->assertTrue($command->getDefinition()->hasArgument('foo'), '->mergeApplicationDefinition(true) merges the application arguments and the command arguments'); - - $m->invoke($command); - $this->assertEquals(2, $command->getDefinition()->getArgumentCount(), '->mergeApplicationDefinition() does not try to merge twice the application arguments'); - } - - public function testRunInteractive() - { - $tester = new CommandTester(new \TestCommand()); - - $tester->execute(array(), array('interactive' => true)); - - $this->assertEquals('interact called'.PHP_EOL.'execute called'.PHP_EOL, $tester->getDisplay(), '->run() calls the interact() method if the input is interactive'); - } - - public function testRunNonInteractive() - { - $tester = new CommandTester(new \TestCommand()); - - $tester->execute(array(), array('interactive' => false)); - - $this->assertEquals('execute called'.PHP_EOL, $tester->getDisplay(), '->run() does not call the interact() method if the input is not interactive'); - } - - /** - * @expectedException \LogicException - * @expectedExceptionMessage You must override the execute() method in the concrete command class. - */ - public function testExecuteMethodNeedsToBeOverridden() - { - $command = new Command('foo'); - $command->run(new StringInput(''), new NullOutput()); - } - - /** - * @expectedException \InvalidArgumentException - * @expectedExceptionMessage The "--bar" option does not exist. - */ - public function testRunWithInvalidOption() - { - $command = new \TestCommand(); - $tester = new CommandTester($command); - $tester->execute(array('--bar' => true)); - } - - public function testRunReturnsIntegerExitCode() - { - $command = new \TestCommand(); - $exitCode = $command->run(new StringInput(''), new NullOutput()); - $this->assertSame(0, $exitCode, '->run() returns integer exit code (treats null as 0)'); - - $command = $this->getMock('TestCommand', array('execute')); - $command->expects($this->once()) - ->method('execute') - ->will($this->returnValue('2.3')); - $exitCode = $command->run(new StringInput(''), new NullOutput()); - $this->assertSame(2, $exitCode, '->run() returns integer exit code (casts numeric to int)'); - } - - public function testRunReturnsAlwaysInteger() - { - $command = new \TestCommand(); - - $this->assertSame(0, $command->run(new StringInput(''), new NullOutput())); - } - - public function testSetCode() - { - $command = new \TestCommand(); - $ret = $command->setCode(function (InputInterface $input, OutputInterface $output) { - $output->writeln('from the code...'); - }); - $this->assertEquals($command, $ret, '->setCode() implements a fluent interface'); - $tester = new CommandTester($command); - $tester->execute(array()); - $this->assertEquals('interact called'.PHP_EOL.'from the code...'.PHP_EOL, $tester->getDisplay()); - } - - public function testSetCodeWithNonClosureCallable() - { - $command = new \TestCommand(); - $ret = $command->setCode(array($this, 'callableMethodCommand')); - $this->assertEquals($command, $ret, '->setCode() implements a fluent interface'); - $tester = new CommandTester($command); - $tester->execute(array()); - $this->assertEquals('interact called'.PHP_EOL.'from the code...'.PHP_EOL, $tester->getDisplay()); - } - - /** - * @expectedException \InvalidArgumentException - * @expectedExceptionMessage Invalid callable provided to Command::setCode. - */ - public function testSetCodeWithNonCallable() - { - $command = new \TestCommand(); - $command->setCode(array($this, 'nonExistentMethod')); - } - - public function callableMethodCommand(InputInterface $input, OutputInterface $output) - { - $output->writeln('from the code...'); - } - - /** - * @group legacy - */ - public function testLegacyAsText() - { - $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED); - - $command = new \TestCommand(); - $command->setApplication(new Application()); - $tester = new CommandTester($command); - $tester->execute(array('command' => $command->getName())); - $this->assertStringEqualsFile(self::$fixturesPath.'/command_astext.txt', $command->asText(), '->asText() returns a text representation of the command'); - } - - /** - * @group legacy - */ - public function testLegacyAsXml() - { - $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED); - - $command = new \TestCommand(); - $command->setApplication(new Application()); - $tester = new CommandTester($command); - $tester->execute(array('command' => $command->getName())); - $this->assertXmlStringEqualsXmlFile(self::$fixturesPath.'/command_asxml.txt', $command->asXml(), '->asXml() returns an XML representation of the command'); - } -} diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Command/HelpCommandTest.php b/vendor/symfony/console/Symfony/Component/Console/Tests/Command/HelpCommandTest.php deleted file mode 100644 index ea69c8b..0000000 --- a/vendor/symfony/console/Symfony/Component/Console/Tests/Command/HelpCommandTest.php +++ /dev/null @@ -1,64 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Tests\Command; - -use Symfony\Component\Console\Tester\CommandTester; -use Symfony\Component\Console\Command\HelpCommand; -use Symfony\Component\Console\Command\ListCommand; -use Symfony\Component\Console\Application; - -class HelpCommandTest extends \PHPUnit_Framework_TestCase -{ - public function testExecuteForCommandAlias() - { - $command = new HelpCommand(); - $command->setApplication(new Application()); - $commandTester = new CommandTester($command); - $commandTester->execute(array('command_name' => 'li')); - $this->assertRegExp('/list \[--xml\] \[--raw\] \[--format="\.\.\."\] \[namespace\]/', $commandTester->getDisplay(), '->execute() returns a text help for the given command alias'); - } - - public function testExecuteForCommand() - { - $command = new HelpCommand(); - $commandTester = new CommandTester($command); - $command->setCommand(new ListCommand()); - $commandTester->execute(array()); - $this->assertRegExp('/list \[--xml\] \[--raw\] \[--format="\.\.\."\] \[namespace\]/', $commandTester->getDisplay(), '->execute() returns a text help for the given command'); - } - - public function testExecuteForCommandWithXmlOption() - { - $command = new HelpCommand(); - $commandTester = new CommandTester($command); - $command->setCommand(new ListCommand()); - $commandTester->execute(array('--format' => 'xml')); - $this->assertRegExp('/<command/', $commandTester->getDisplay(), '->execute() returns an XML help text if --xml is passed'); - } - - public function testExecuteForApplicationCommand() - { - $application = new Application(); - $commandTester = new CommandTester($application->get('help')); - $commandTester->execute(array('command_name' => 'list')); - $this->assertRegExp('/list \[--xml\] \[--raw\] \[--format="\.\.\."\] \[namespace\]/', $commandTester->getDisplay(), '->execute() returns a text help for the given command'); - } - - public function testExecuteForApplicationCommandWithXmlOption() - { - $application = new Application(); - $commandTester = new CommandTester($application->get('help')); - $commandTester->execute(array('command_name' => 'list', '--format' => 'xml')); - $this->assertRegExp('/list \[--xml\] \[--raw\] \[--format="\.\.\."\] \[namespace\]/', $commandTester->getDisplay(), '->execute() returns a text help for the given command'); - $this->assertRegExp('/<command/', $commandTester->getDisplay(), '->execute() returns an XML help text if --format=xml is passed'); - } -} diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Command/ListCommandTest.php b/vendor/symfony/console/Symfony/Component/Console/Tests/Command/ListCommandTest.php deleted file mode 100644 index fbb9fee..0000000 --- a/vendor/symfony/console/Symfony/Component/Console/Tests/Command/ListCommandTest.php +++ /dev/null @@ -1,64 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Tests\Command; - -use Symfony\Component\Console\Tester\CommandTester; -use Symfony\Component\Console\Application; - -class ListCommandTest extends \PHPUnit_Framework_TestCase -{ - public function testExecuteListsCommands() - { - $application = new Application(); - $commandTester = new CommandTester($command = $application->get('list')); - $commandTester->execute(array('command' => $command->getName()), array('decorated' => false)); - - $this->assertRegExp('/help Displays help for a command/', $commandTester->getDisplay(), '->execute() returns a list of available commands'); - } - - public function testExecuteListsCommandsWithXmlOption() - { - $application = new Application(); - $commandTester = new CommandTester($command = $application->get('list')); - $commandTester->execute(array('command' => $command->getName(), '--format' => 'xml')); - $this->assertRegExp('/<command id="list" name="list">/', $commandTester->getDisplay(), '->execute() returns a list of available commands in XML if --xml is passed'); - } - - public function testExecuteListsCommandsWithRawOption() - { - $application = new Application(); - $commandTester = new CommandTester($command = $application->get('list')); - $commandTester->execute(array('command' => $command->getName(), '--raw' => true)); - $output = <<<EOF -help Displays help for a command -list Lists commands - -EOF; - - $this->assertEquals($output, $commandTester->getDisplay(true)); - } - - public function testExecuteListsCommandsWithNamespaceArgument() - { - require_once realpath(__DIR__.'/../Fixtures/FooCommand.php'); - $application = new Application(); - $application->add(new \FooCommand()); - $commandTester = new CommandTester($command = $application->get('list')); - $commandTester->execute(array('command' => $command->getName(), 'namespace' => 'foo', '--raw' => true)); - $output = <<<EOF -foo:bar The foo:bar command - -EOF; - - $this->assertEquals($output, $commandTester->getDisplay(true)); - } -} diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Descriptor/AbstractDescriptorTest.php b/vendor/symfony/console/Symfony/Component/Console/Tests/Descriptor/AbstractDescriptorTest.php deleted file mode 100644 index 406c659..0000000 --- a/vendor/symfony/console/Symfony/Component/Console/Tests/Descriptor/AbstractDescriptorTest.php +++ /dev/null @@ -1,105 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Tests\Descriptor; - -use Symfony\Component\Console\Application; -use Symfony\Component\Console\Command\Command; -use Symfony\Component\Console\Input\InputArgument; -use Symfony\Component\Console\Input\InputDefinition; -use Symfony\Component\Console\Input\InputOption; -use Symfony\Component\Console\Output\BufferedOutput; - -abstract class AbstractDescriptorTest extends \PHPUnit_Framework_TestCase -{ - /** @dataProvider getDescribeInputArgumentTestData */ - public function testDescribeInputArgument(InputArgument $argument, $expectedDescription) - { - $this->assertDescription($expectedDescription, $argument); - } - - /** @dataProvider getDescribeInputOptionTestData */ - public function testDescribeInputOption(InputOption $option, $expectedDescription) - { - $this->assertDescription($expectedDescription, $option); - } - - /** @dataProvider getDescribeInputDefinitionTestData */ - public function testDescribeInputDefinition(InputDefinition $definition, $expectedDescription) - { - $this->assertDescription($expectedDescription, $definition); - } - - /** @dataProvider getDescribeCommandTestData */ - public function testDescribeCommand(Command $command, $expectedDescription) - { - $this->assertDescription($expectedDescription, $command); - } - - /** @dataProvider getDescribeApplicationTestData */ - public function testDescribeApplication(Application $application, $expectedDescription) - { - // Replaces the dynamic placeholders of the command help text with a static version. - // The placeholder %command.full_name% includes the script path that is not predictable - // and can not be tested against. - foreach ($application->all() as $command) { - $command->setHelp(str_replace('%command.full_name%', 'app/console %command.name%', $command->getHelp())); - } - - $this->assertDescription($expectedDescription, $application); - } - - public function getDescribeInputArgumentTestData() - { - return $this->getDescriptionTestData(ObjectsProvider::getInputArguments()); - } - - public function getDescribeInputOptionTestData() - { - return $this->getDescriptionTestData(ObjectsProvider::getInputOptions()); - } - - public function getDescribeInputDefinitionTestData() - { - return $this->getDescriptionTestData(ObjectsProvider::getInputDefinitions()); - } - - public function getDescribeCommandTestData() - { - return $this->getDescriptionTestData(ObjectsProvider::getCommands()); - } - - public function getDescribeApplicationTestData() - { - return $this->getDescriptionTestData(ObjectsProvider::getApplications()); - } - - abstract protected function getDescriptor(); - abstract protected function getFormat(); - - private function getDescriptionTestData(array $objects) - { - $data = array(); - foreach ($objects as $name => $object) { - $description = file_get_contents(sprintf('%s/../Fixtures/%s.%s', __DIR__, $name, $this->getFormat())); - $data[] = array($object, $description); - } - - return $data; - } - - private function assertDescription($expectedDescription, $describedObject) - { - $output = new BufferedOutput(BufferedOutput::VERBOSITY_NORMAL, true); - $this->getDescriptor()->describe($output, $describedObject, array('raw_output' => true)); - $this->assertEquals(trim($expectedDescription), trim(str_replace(PHP_EOL, "\n", $output->fetch()))); - } -} diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Descriptor/JsonDescriptorTest.php b/vendor/symfony/console/Symfony/Component/Console/Tests/Descriptor/JsonDescriptorTest.php deleted file mode 100644 index 943ea29..0000000 --- a/vendor/symfony/console/Symfony/Component/Console/Tests/Descriptor/JsonDescriptorTest.php +++ /dev/null @@ -1,27 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Tests\Descriptor; - -use Symfony\Component\Console\Descriptor\JsonDescriptor; - -class JsonDescriptorTest extends AbstractDescriptorTest -{ - protected function getDescriptor() - { - return new JsonDescriptor(); - } - - protected function getFormat() - { - return 'json'; - } -} diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Descriptor/MarkdownDescriptorTest.php b/vendor/symfony/console/Symfony/Component/Console/Tests/Descriptor/MarkdownDescriptorTest.php deleted file mode 100644 index c85e8a5..0000000 --- a/vendor/symfony/console/Symfony/Component/Console/Tests/Descriptor/MarkdownDescriptorTest.php +++ /dev/null @@ -1,27 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Tests\Descriptor; - -use Symfony\Component\Console\Descriptor\MarkdownDescriptor; - -class MarkdownDescriptorTest extends AbstractDescriptorTest -{ - protected function getDescriptor() - { - return new MarkdownDescriptor(); - } - - protected function getFormat() - { - return 'md'; - } -} diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Descriptor/ObjectsProvider.php b/vendor/symfony/console/Symfony/Component/Console/Tests/Descriptor/ObjectsProvider.php deleted file mode 100644 index a3c49d7..0000000 --- a/vendor/symfony/console/Symfony/Component/Console/Tests/Descriptor/ObjectsProvider.php +++ /dev/null @@ -1,74 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Tests\Descriptor; - -use Symfony\Component\Console\Input\InputArgument; -use Symfony\Component\Console\Input\InputDefinition; -use Symfony\Component\Console\Input\InputOption; -use Symfony\Component\Console\Tests\Fixtures\DescriptorApplication1; -use Symfony\Component\Console\Tests\Fixtures\DescriptorApplication2; -use Symfony\Component\Console\Tests\Fixtures\DescriptorCommand1; -use Symfony\Component\Console\Tests\Fixtures\DescriptorCommand2; - -/** - * @author Jean-François Simon <contact@jfsimon.fr> - */ -class ObjectsProvider -{ - public static function getInputArguments() - { - return array( - 'input_argument_1' => new InputArgument('argument_name', InputArgument::REQUIRED), - 'input_argument_2' => new InputArgument('argument_name', InputArgument::IS_ARRAY, 'argument description'), - 'input_argument_3' => new InputArgument('argument_name', InputArgument::OPTIONAL, 'argument description', 'default_value'), - ); - } - - public static function getInputOptions() - { - return array( - 'input_option_1' => new InputOption('option_name', 'o', InputOption::VALUE_NONE), - 'input_option_2' => new InputOption('option_name', 'o', InputOption::VALUE_OPTIONAL, 'option description', 'default_value'), - 'input_option_3' => new InputOption('option_name', 'o', InputOption::VALUE_REQUIRED, 'option description'), - 'input_option_4' => new InputOption('option_name', 'o', InputOption::VALUE_IS_ARRAY | InputOption::VALUE_OPTIONAL, 'option description', array()), - ); - } - - public static function getInputDefinitions() - { - return array( - 'input_definition_1' => new InputDefinition(), - 'input_definition_2' => new InputDefinition(array(new InputArgument('argument_name', InputArgument::REQUIRED))), - 'input_definition_3' => new InputDefinition(array(new InputOption('option_name', 'o', InputOption::VALUE_NONE))), - 'input_definition_4' => new InputDefinition(array( - new InputArgument('argument_name', InputArgument::REQUIRED), - new InputOption('option_name', 'o', InputOption::VALUE_NONE), - )), - ); - } - - public static function getCommands() - { - return array( - 'command_1' => new DescriptorCommand1(), - 'command_2' => new DescriptorCommand2(), - ); - } - - public static function getApplications() - { - return array( - 'application_1' => new DescriptorApplication1(), - 'application_2' => new DescriptorApplication2(), - ); - } -} diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Descriptor/TextDescriptorTest.php b/vendor/symfony/console/Symfony/Component/Console/Tests/Descriptor/TextDescriptorTest.php deleted file mode 100644 index 350b679..0000000 --- a/vendor/symfony/console/Symfony/Component/Console/Tests/Descriptor/TextDescriptorTest.php +++ /dev/null @@ -1,27 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Tests\Descriptor; - -use Symfony\Component\Console\Descriptor\TextDescriptor; - -class TextDescriptorTest extends AbstractDescriptorTest -{ - protected function getDescriptor() - { - return new TextDescriptor(); - } - - protected function getFormat() - { - return 'txt'; - } -} diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Descriptor/XmlDescriptorTest.php b/vendor/symfony/console/Symfony/Component/Console/Tests/Descriptor/XmlDescriptorTest.php deleted file mode 100644 index 59a5d1e..0000000 --- a/vendor/symfony/console/Symfony/Component/Console/Tests/Descriptor/XmlDescriptorTest.php +++ /dev/null @@ -1,27 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Tests\Descriptor; - -use Symfony\Component\Console\Descriptor\XmlDescriptor; - -class XmlDescriptorTest extends AbstractDescriptorTest -{ - protected function getDescriptor() - { - return new XmlDescriptor(); - } - - protected function getFormat() - { - return 'xml'; - } -} diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/BarBucCommand.php b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/BarBucCommand.php deleted file mode 100644 index 52b619e..0000000 --- a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/BarBucCommand.php +++ /dev/null @@ -1,11 +0,0 @@ -<?php - -use Symfony\Component\Console\Command\Command; - -class BarBucCommand extends Command -{ - protected function configure() - { - $this->setName('bar:buc'); - } -} diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/DescriptorApplication1.php b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/DescriptorApplication1.php deleted file mode 100644 index 132b6d5..0000000 --- a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/DescriptorApplication1.php +++ /dev/null @@ -1,18 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Tests\Fixtures; - -use Symfony\Component\Console\Application; - -class DescriptorApplication1 extends Application -{ -} diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/DescriptorApplication2.php b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/DescriptorApplication2.php deleted file mode 100644 index ff55135..0000000 --- a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/DescriptorApplication2.php +++ /dev/null @@ -1,24 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Tests\Fixtures; - -use Symfony\Component\Console\Application; - -class DescriptorApplication2 extends Application -{ - public function __construct() - { - parent::__construct('My Symfony application', 'v1.0'); - $this->add(new DescriptorCommand1()); - $this->add(new DescriptorCommand2()); - } -} diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/DescriptorCommand1.php b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/DescriptorCommand1.php deleted file mode 100644 index ede05d7..0000000 --- a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/DescriptorCommand1.php +++ /dev/null @@ -1,27 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Tests\Fixtures; - -use Symfony\Component\Console\Command\Command; - -class DescriptorCommand1 extends Command -{ - protected function configure() - { - $this - ->setName('descriptor:command1') - ->setAliases(array('alias1', 'alias2')) - ->setDescription('command 1 description') - ->setHelp('command 1 help') - ; - } -} diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/DescriptorCommand2.php b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/DescriptorCommand2.php deleted file mode 100644 index bc04ca9..0000000 --- a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/DescriptorCommand2.php +++ /dev/null @@ -1,30 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Tests\Fixtures; - -use Symfony\Component\Console\Command\Command; -use Symfony\Component\Console\Input\InputArgument; -use Symfony\Component\Console\Input\InputOption; - -class DescriptorCommand2 extends Command -{ - protected function configure() - { - $this - ->setName('descriptor:command2') - ->setDescription('command 2 description') - ->setHelp('command 2 help') - ->addArgument('argument_name', InputArgument::REQUIRED) - ->addOption('option_name', 'o', InputOption::VALUE_NONE) - ; - } -} diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/DummyOutput.php b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/DummyOutput.php deleted file mode 100644 index aef6d22..0000000 --- a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/DummyOutput.php +++ /dev/null @@ -1,36 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Tests\Fixtures; - -use Symfony\Component\Console\Output\BufferedOutput; - -/** - * Dummy output - * - * @author Kévin Dunglas <dunglas@gmail.com> - */ -class DummyOutput extends BufferedOutput -{ - /** - * @return array - */ - public function getLogs() - { - $logs = array(); - foreach (explode("\n", trim($this->fetch())) as $message) { - preg_match('/^\[(.*)\] (.*)/', $message, $matches); - $logs[] = sprintf('%s %s', $matches[1], $matches[2]); - } - - return $logs; - } -} diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/Foo1Command.php b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/Foo1Command.php deleted file mode 100644 index 254162f..0000000 --- a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/Foo1Command.php +++ /dev/null @@ -1,26 +0,0 @@ -<?php - -use Symfony\Component\Console\Command\Command; -use Symfony\Component\Console\Input\InputInterface; -use Symfony\Component\Console\Output\OutputInterface; - -class Foo1Command extends Command -{ - public $input; - public $output; - - protected function configure() - { - $this - ->setName('foo:bar1') - ->setDescription('The foo:bar1 command') - ->setAliases(array('afoobar1')) - ; - } - - protected function execute(InputInterface $input, OutputInterface $output) - { - $this->input = $input; - $this->output = $output; - } -} diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/Foo2Command.php b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/Foo2Command.php deleted file mode 100644 index 8071dc8..0000000 --- a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/Foo2Command.php +++ /dev/null @@ -1,21 +0,0 @@ -<?php - -use Symfony\Component\Console\Command\Command; -use Symfony\Component\Console\Input\InputInterface; -use Symfony\Component\Console\Output\OutputInterface; - -class Foo2Command extends Command -{ - protected function configure() - { - $this - ->setName('foo1:bar') - ->setDescription('The foo1:bar command') - ->setAliases(array('afoobar2')) - ; - } - - protected function execute(InputInterface $input, OutputInterface $output) - { - } -} diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/Foo3Command.php b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/Foo3Command.php deleted file mode 100644 index 6c890fa..0000000 --- a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/Foo3Command.php +++ /dev/null @@ -1,29 +0,0 @@ -<?php - -use Symfony\Component\Console\Command\Command; -use Symfony\Component\Console\Input\InputInterface; -use Symfony\Component\Console\Output\OutputInterface; - -class Foo3Command extends Command -{ - protected function configure() - { - $this - ->setName('foo3:bar') - ->setDescription('The foo3:bar command') - ; - } - - protected function execute(InputInterface $input, OutputInterface $output) - { - try { - try { - throw new \Exception('First exception <p>this is html</p>'); - } catch (\Exception $e) { - throw new \Exception('Second exception <comment>comment</comment>', 0, $e); - } - } catch (\Exception $e) { - throw new \Exception('Third exception <fg=blue;bg=red>comment</>', 0, $e); - } - } -} diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/Foo4Command.php b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/Foo4Command.php deleted file mode 100644 index 1c54639..0000000 --- a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/Foo4Command.php +++ /dev/null @@ -1,11 +0,0 @@ -<?php - -use Symfony\Component\Console\Command\Command; - -class Foo4Command extends Command -{ - protected function configure() - { - $this->setName('foo3:bar:toh'); - } -} diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/Foo5Command.php b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/Foo5Command.php deleted file mode 100644 index a1c6082..0000000 --- a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/Foo5Command.php +++ /dev/null @@ -1,10 +0,0 @@ -<?php - -use Symfony\Component\Console\Command\Command; - -class Foo5Command extends Command -{ - public function __construct() - { - } -} diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/FooCommand.php b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/FooCommand.php deleted file mode 100644 index 355e0ad..0000000 --- a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/FooCommand.php +++ /dev/null @@ -1,33 +0,0 @@ -<?php - -use Symfony\Component\Console\Command\Command; -use Symfony\Component\Console\Input\InputInterface; -use Symfony\Component\Console\Output\OutputInterface; - -class FooCommand extends Command -{ - public $input; - public $output; - - protected function configure() - { - $this - ->setName('foo:bar') - ->setDescription('The foo:bar command') - ->setAliases(array('afoobar')) - ; - } - - protected function interact(InputInterface $input, OutputInterface $output) - { - $output->writeln('interact called'); - } - - protected function execute(InputInterface $input, OutputInterface $output) - { - $this->input = $input; - $this->output = $output; - - $output->writeln('called'); - } -} diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/FooSubnamespaced1Command.php b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/FooSubnamespaced1Command.php deleted file mode 100644 index fc50c72..0000000 --- a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/FooSubnamespaced1Command.php +++ /dev/null @@ -1,26 +0,0 @@ -<?php - -use Symfony\Component\Console\Command\Command; -use Symfony\Component\Console\Input\InputInterface; -use Symfony\Component\Console\Output\OutputInterface; - -class FooSubnamespaced1Command extends Command -{ - public $input; - public $output; - - protected function configure() - { - $this - ->setName('foo:bar:baz') - ->setDescription('The foo:bar:baz command') - ->setAliases(array('foobarbaz')) - ; - } - - protected function execute(InputInterface $input, OutputInterface $output) - { - $this->input = $input; - $this->output = $output; - } -} diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/FooSubnamespaced2Command.php b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/FooSubnamespaced2Command.php deleted file mode 100644 index 1cf31ff..0000000 --- a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/FooSubnamespaced2Command.php +++ /dev/null @@ -1,26 +0,0 @@ -<?php - -use Symfony\Component\Console\Command\Command; -use Symfony\Component\Console\Input\InputInterface; -use Symfony\Component\Console\Output\OutputInterface; - -class FooSubnamespaced2Command extends Command -{ - public $input; - public $output; - - protected function configure() - { - $this - ->setName('foo:go:bret') - ->setDescription('The foo:bar:go command') - ->setAliases(array('foobargo')) - ; - } - - protected function execute(InputInterface $input, OutputInterface $output) - { - $this->input = $input; - $this->output = $output; - } -} diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/FoobarCommand.php b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/FoobarCommand.php deleted file mode 100644 index 9681628..0000000 --- a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/FoobarCommand.php +++ /dev/null @@ -1,25 +0,0 @@ -<?php - -use Symfony\Component\Console\Command\Command; -use Symfony\Component\Console\Input\InputInterface; -use Symfony\Component\Console\Output\OutputInterface; - -class FoobarCommand extends Command -{ - public $input; - public $output; - - protected function configure() - { - $this - ->setName('foobar:foo') - ->setDescription('The foobar:foo command') - ; - } - - protected function execute(InputInterface $input, OutputInterface $output) - { - $this->input = $input; - $this->output = $output; - } -} diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/TestCommand.php b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/TestCommand.php deleted file mode 100644 index dcd3273..0000000 --- a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/TestCommand.php +++ /dev/null @@ -1,28 +0,0 @@ -<?php - -use Symfony\Component\Console\Command\Command; -use Symfony\Component\Console\Input\InputInterface; -use Symfony\Component\Console\Output\OutputInterface; - -class TestCommand extends Command -{ - protected function configure() - { - $this - ->setName('namespace:name') - ->setAliases(array('name')) - ->setDescription('description') - ->setHelp('help') - ; - } - - protected function execute(InputInterface $input, OutputInterface $output) - { - $output->writeln('execute called'); - } - - protected function interact(InputInterface $input, OutputInterface $output) - { - $output->writeln('interact called'); - } -} diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/application_1.json b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/application_1.json deleted file mode 100644 index 7f8d92e..0000000 --- a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/application_1.json +++ /dev/null @@ -1 +0,0 @@ -{"commands":[{"name":"help","usage":"help [--xml] [--format=\"...\"] [--raw] [command_name]","description":"Displays help for a command","help":"The <info>help<\/info> command displays help for a given command:\n\n <info>php app\/console help list<\/info>\n\nYou can also output the help in other formats by using the <comment>--format<\/comment> option:\n\n <info>php app\/console help --format=xml list<\/info>\n\nTo display the list of available commands, please use the <info>list<\/info> command.","aliases":[],"definition":{"arguments":{"command_name":{"name":"command_name","is_required":false,"is_array":false,"description":"The command name","default":"help"}},"options":{"xml":{"name":"--xml","shortcut":"","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"To output help as XML","default":false},"format":{"name":"--format","shortcut":"","accept_value":true,"is_value_required":true,"is_multiple":false,"description":"To output help in other formats","default":"txt"},"raw":{"name":"--raw","shortcut":"","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"To output raw command help","default":false},"help":{"name":"--help","shortcut":"-h","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"Display this help message","default":false},"quiet":{"name":"--quiet","shortcut":"-q","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"Do not output any message","default":false},"verbose":{"name":"--verbose","shortcut":"-v|-vv|-vvv","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug","default":false},"version":{"name":"--version","shortcut":"-V","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"Display this application version","default":false},"ansi":{"name":"--ansi","shortcut":"","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"Force ANSI output","default":false},"no-ansi":{"name":"--no-ansi","shortcut":"","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"Disable ANSI output","default":false},"no-interaction":{"name":"--no-interaction","shortcut":"-n","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"Do not ask any interactive question","default":false}}}},{"name":"list","usage":"list [--xml] [--raw] [--format=\"...\"] [namespace]","description":"Lists commands","help":"The <info>list<\/info> command lists all commands:\n\n <info>php app\/console list<\/info>\n\nYou can also display the commands for a specific namespace:\n\n <info>php app\/console list test<\/info>\n\nYou can also output the information in other formats by using the <comment>--format<\/comment> option:\n\n <info>php app\/console list --format=xml<\/info>\n\nIt's also possible to get raw list of commands (useful for embedding command runner):\n\n <info>php app\/console list --raw<\/info>","aliases":[],"definition":{"arguments":{"namespace":{"name":"namespace","is_required":false,"is_array":false,"description":"The namespace name","default":null}},"options":{"xml":{"name":"--xml","shortcut":"","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"To output list as XML","default":false},"raw":{"name":"--raw","shortcut":"","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"To output raw command list","default":false},"format":{"name":"--format","shortcut":"","accept_value":true,"is_value_required":true,"is_multiple":false,"description":"To output list in other formats","default":"txt"}}}}],"namespaces":[{"id":"_global","commands":["help","list"]}]} diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/application_1.md b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/application_1.md deleted file mode 100644 index e380416..0000000 --- a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/application_1.md +++ /dev/null @@ -1,199 +0,0 @@ -UNKNOWN -======= - -* help -* list - -help ----- - -* Description: Displays help for a command -* Usage: `help [--xml] [--format="..."] [--raw] [command_name]` -* Aliases: <none> - -The <info>help</info> command displays help for a given command: - - <info>php app/console help list</info> - -You can also output the help in other formats by using the <comment>--format</comment> option: - - <info>php app/console help --format=xml list</info> - -To display the list of available commands, please use the <info>list</info> command. - -### Arguments: - -**command_name:** - -* Name: command_name -* Is required: no -* Is array: no -* Description: The command name -* Default: `'help'` - -### Options: - -**xml:** - -* Name: `--xml` -* Shortcut: <none> -* Accept value: no -* Is value required: no -* Is multiple: no -* Description: To output help as XML -* Default: `false` - -**format:** - -* Name: `--format` -* Shortcut: <none> -* Accept value: yes -* Is value required: yes -* Is multiple: no -* Description: To output help in other formats -* Default: `'txt'` - -**raw:** - -* Name: `--raw` -* Shortcut: <none> -* Accept value: no -* Is value required: no -* Is multiple: no -* Description: To output raw command help -* Default: `false` - -**help:** - -* Name: `--help` -* Shortcut: `-h` -* Accept value: no -* Is value required: no -* Is multiple: no -* Description: Display this help message -* Default: `false` - -**quiet:** - -* Name: `--quiet` -* Shortcut: `-q` -* Accept value: no -* Is value required: no -* Is multiple: no -* Description: Do not output any message -* Default: `false` - -**verbose:** - -* Name: `--verbose` -* Shortcut: `-v|-vv|-vvv` -* Accept value: no -* Is value required: no -* Is multiple: no -* Description: Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug -* Default: `false` - -**version:** - -* Name: `--version` -* Shortcut: `-V` -* Accept value: no -* Is value required: no -* Is multiple: no -* Description: Display this application version -* Default: `false` - -**ansi:** - -* Name: `--ansi` -* Shortcut: <none> -* Accept value: no -* Is value required: no -* Is multiple: no -* Description: Force ANSI output -* Default: `false` - -**no-ansi:** - -* Name: `--no-ansi` -* Shortcut: <none> -* Accept value: no -* Is value required: no -* Is multiple: no -* Description: Disable ANSI output -* Default: `false` - -**no-interaction:** - -* Name: `--no-interaction` -* Shortcut: `-n` -* Accept value: no -* Is value required: no -* Is multiple: no -* Description: Do not ask any interactive question -* Default: `false` - -list ----- - -* Description: Lists commands -* Usage: `list [--xml] [--raw] [--format="..."] [namespace]` -* Aliases: <none> - -The <info>list</info> command lists all commands: - - <info>php app/console list</info> - -You can also display the commands for a specific namespace: - - <info>php app/console list test</info> - -You can also output the information in other formats by using the <comment>--format</comment> option: - - <info>php app/console list --format=xml</info> - -It's also possible to get raw list of commands (useful for embedding command runner): - - <info>php app/console list --raw</info> - -### Arguments: - -**namespace:** - -* Name: namespace -* Is required: no -* Is array: no -* Description: The namespace name -* Default: `NULL` - -### Options: - -**xml:** - -* Name: `--xml` -* Shortcut: <none> -* Accept value: no -* Is value required: no -* Is multiple: no -* Description: To output list as XML -* Default: `false` - -**raw:** - -* Name: `--raw` -* Shortcut: <none> -* Accept value: no -* Is value required: no -* Is multiple: no -* Description: To output raw command list -* Default: `false` - -**format:** - -* Name: `--format` -* Shortcut: <none> -* Accept value: yes -* Is value required: yes -* Is multiple: no -* Description: To output list in other formats -* Default: `'txt'` diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/application_1.txt b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/application_1.txt deleted file mode 100644 index f3a1968..0000000 --- a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/application_1.txt +++ /dev/null @@ -1,17 +0,0 @@ -<info>Console Tool</info> - -<comment>Usage:</comment> - command [options] [arguments] - -<comment>Options:</comment> - <info>--help</info> (-h) Display this help message - <info>--quiet</info> (-q) Do not output any message - <info>--verbose</info> (-v|vv|vvv) Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug - <info>--version</info> (-V) Display this application version - <info>--ansi</info> Force ANSI output - <info>--no-ansi</info> Disable ANSI output - <info>--no-interaction</info> (-n) Do not ask any interactive question - -<comment>Available commands:</comment> - <info>help </info> Displays help for a command - <info>list </info> Lists commands diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/application_1.xml b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/application_1.xml deleted file mode 100644 index 1763108..0000000 --- a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/application_1.xml +++ /dev/null @@ -1,108 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<symfony> - <commands> - <command id="help" name="help"> - <usage>help [--xml] [--format="..."] [--raw] [command_name]</usage> - <description>Displays help for a command</description> - <help>The <info>help</info> command displays help for a given command: - - <info>php app/console help list</info> - - You can also output the help in other formats by using the <comment>--format</comment> option: - - <info>php app/console help --format=xml list</info> - - To display the list of available commands, please use the <info>list</info> command.</help> - <aliases/> - <arguments> - <argument name="command_name" is_required="0" is_array="0"> - <description>The command name</description> - <defaults> - <default>help</default> - </defaults> - </argument> - </arguments> - <options> - <option name="--xml" shortcut="" accept_value="0" is_value_required="0" is_multiple="0"> - <description>To output help as XML</description> - </option> - <option name="--format" shortcut="" accept_value="1" is_value_required="1" is_multiple="0"> - <description>To output help in other formats</description> - <defaults> - <default>txt</default> - </defaults> - </option> - <option name="--raw" shortcut="" accept_value="0" is_value_required="0" is_multiple="0"> - <description>To output raw command help</description> - </option> - <option name="--help" shortcut="-h" accept_value="0" is_value_required="0" is_multiple="0"> - <description>Display this help message</description> - </option> - <option name="--quiet" shortcut="-q" accept_value="0" is_value_required="0" is_multiple="0"> - <description>Do not output any message</description> - </option> - <option name="--verbose" shortcut="-v" shortcuts="-v|-vv|-vvv" accept_value="0" is_value_required="0" is_multiple="0"> - <description>Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug</description> - </option> - <option name="--version" shortcut="-V" accept_value="0" is_value_required="0" is_multiple="0"> - <description>Display this application version</description> - </option> - <option name="--ansi" shortcut="" accept_value="0" is_value_required="0" is_multiple="0"> - <description>Force ANSI output</description> - </option> - <option name="--no-ansi" shortcut="" accept_value="0" is_value_required="0" is_multiple="0"> - <description>Disable ANSI output</description> - </option> - <option name="--no-interaction" shortcut="-n" accept_value="0" is_value_required="0" is_multiple="0"> - <description>Do not ask any interactive question</description> - </option> - </options> - </command> - <command id="list" name="list"> - <usage>list [--xml] [--raw] [--format="..."] [namespace]</usage> - <description>Lists commands</description> - <help>The <info>list</info> command lists all commands: - - <info>php app/console list</info> - - You can also display the commands for a specific namespace: - - <info>php app/console list test</info> - - You can also output the information in other formats by using the <comment>--format</comment> option: - - <info>php app/console list --format=xml</info> - - It's also possible to get raw list of commands (useful for embedding command runner): - - <info>php app/console list --raw</info></help> - <aliases/> - <arguments> - <argument name="namespace" is_required="0" is_array="0"> - <description>The namespace name</description> - <defaults/> - </argument> - </arguments> - <options> - <option name="--xml" shortcut="" accept_value="0" is_value_required="0" is_multiple="0"> - <description>To output list as XML</description> - </option> - <option name="--raw" shortcut="" accept_value="0" is_value_required="0" is_multiple="0"> - <description>To output raw command list</description> - </option> - <option name="--format" shortcut="" accept_value="1" is_value_required="1" is_multiple="0"> - <description>To output list in other formats</description> - <defaults> - <default>txt</default> - </defaults> - </option> - </options> - </command> - </commands> - <namespaces> - <namespace id="_global"> - <command>help</command> - <command>list</command> - </namespace> - </namespaces> -</symfony> diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/application_2.json b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/application_2.json deleted file mode 100644 index 1655d47..0000000 --- a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/application_2.json +++ /dev/null @@ -1 +0,0 @@ -{"commands":[{"name":"help","usage":"help [--xml] [--format=\"...\"] [--raw] [command_name]","description":"Displays help for a command","help":"The <info>help<\/info> command displays help for a given command:\n\n <info>php app\/console help list<\/info>\n\nYou can also output the help in other formats by using the <comment>--format<\/comment> option:\n\n <info>php app\/console help --format=xml list<\/info>\n\nTo display the list of available commands, please use the <info>list<\/info> command.","aliases":[],"definition":{"arguments":{"command_name":{"name":"command_name","is_required":false,"is_array":false,"description":"The command name","default":"help"}},"options":{"xml":{"name":"--xml","shortcut":"","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"To output help as XML","default":false},"format":{"name":"--format","shortcut":"","accept_value":true,"is_value_required":true,"is_multiple":false,"description":"To output help in other formats","default":"txt"},"raw":{"name":"--raw","shortcut":"","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"To output raw command help","default":false},"help":{"name":"--help","shortcut":"-h","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"Display this help message","default":false},"quiet":{"name":"--quiet","shortcut":"-q","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"Do not output any message","default":false},"verbose":{"name":"--verbose","shortcut":"-v|-vv|-vvv","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug","default":false},"version":{"name":"--version","shortcut":"-V","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"Display this application version","default":false},"ansi":{"name":"--ansi","shortcut":"","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"Force ANSI output","default":false},"no-ansi":{"name":"--no-ansi","shortcut":"","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"Disable ANSI output","default":false},"no-interaction":{"name":"--no-interaction","shortcut":"-n","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"Do not ask any interactive question","default":false}}}},{"name":"list","usage":"list [--xml] [--raw] [--format=\"...\"] [namespace]","description":"Lists commands","help":"The <info>list<\/info> command lists all commands:\n\n <info>php app\/console list<\/info>\n\nYou can also display the commands for a specific namespace:\n\n <info>php app\/console list test<\/info>\n\nYou can also output the information in other formats by using the <comment>--format<\/comment> option:\n\n <info>php app\/console list --format=xml<\/info>\n\nIt's also possible to get raw list of commands (useful for embedding command runner):\n\n <info>php app\/console list --raw<\/info>","aliases":[],"definition":{"arguments":{"namespace":{"name":"namespace","is_required":false,"is_array":false,"description":"The namespace name","default":null}},"options":{"xml":{"name":"--xml","shortcut":"","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"To output list as XML","default":false},"raw":{"name":"--raw","shortcut":"","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"To output raw command list","default":false},"format":{"name":"--format","shortcut":"","accept_value":true,"is_value_required":true,"is_multiple":false,"description":"To output list in other formats","default":"txt"}}}},{"name":"descriptor:command1","usage":"descriptor:command1","description":"command 1 description","help":"command 1 help","aliases":["alias1","alias2"],"definition":{"arguments":[],"options":{"help":{"name":"--help","shortcut":"-h","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"Display this help message","default":false},"quiet":{"name":"--quiet","shortcut":"-q","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"Do not output any message","default":false},"verbose":{"name":"--verbose","shortcut":"-v|-vv|-vvv","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug","default":false},"version":{"name":"--version","shortcut":"-V","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"Display this application version","default":false},"ansi":{"name":"--ansi","shortcut":"","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"Force ANSI output","default":false},"no-ansi":{"name":"--no-ansi","shortcut":"","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"Disable ANSI output","default":false},"no-interaction":{"name":"--no-interaction","shortcut":"-n","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"Do not ask any interactive question","default":false}}}},{"name":"descriptor:command2","usage":"descriptor:command2 [-o|--option_name] argument_name","description":"command 2 description","help":"command 2 help","aliases":[],"definition":{"arguments":{"argument_name":{"name":"argument_name","is_required":true,"is_array":false,"description":"","default":null}},"options":{"option_name":{"name":"--option_name","shortcut":"-o","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"","default":false},"help":{"name":"--help","shortcut":"-h","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"Display this help message","default":false},"quiet":{"name":"--quiet","shortcut":"-q","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"Do not output any message","default":false},"verbose":{"name":"--verbose","shortcut":"-v|-vv|-vvv","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug","default":false},"version":{"name":"--version","shortcut":"-V","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"Display this application version","default":false},"ansi":{"name":"--ansi","shortcut":"","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"Force ANSI output","default":false},"no-ansi":{"name":"--no-ansi","shortcut":"","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"Disable ANSI output","default":false},"no-interaction":{"name":"--no-interaction","shortcut":"-n","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"Do not ask any interactive question","default":false}}}}],"namespaces":[{"id":"_global","commands":["alias1","alias2","help","list"]},{"id":"descriptor","commands":["descriptor:command1","descriptor:command2"]}]} diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/application_2.md b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/application_2.md deleted file mode 100644 index 7492886..0000000 --- a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/application_2.md +++ /dev/null @@ -1,388 +0,0 @@ -My Symfony application -====================== - -* alias1 -* alias2 -* help -* list - -**descriptor:** - -* descriptor:command1 -* descriptor:command2 - -help ----- - -* Description: Displays help for a command -* Usage: `help [--xml] [--format="..."] [--raw] [command_name]` -* Aliases: <none> - -The <info>help</info> command displays help for a given command: - - <info>php app/console help list</info> - -You can also output the help in other formats by using the <comment>--format</comment> option: - - <info>php app/console help --format=xml list</info> - -To display the list of available commands, please use the <info>list</info> command. - -### Arguments: - -**command_name:** - -* Name: command_name -* Is required: no -* Is array: no -* Description: The command name -* Default: `'help'` - -### Options: - -**xml:** - -* Name: `--xml` -* Shortcut: <none> -* Accept value: no -* Is value required: no -* Is multiple: no -* Description: To output help as XML -* Default: `false` - -**format:** - -* Name: `--format` -* Shortcut: <none> -* Accept value: yes -* Is value required: yes -* Is multiple: no -* Description: To output help in other formats -* Default: `'txt'` - -**raw:** - -* Name: `--raw` -* Shortcut: <none> -* Accept value: no -* Is value required: no -* Is multiple: no -* Description: To output raw command help -* Default: `false` - -**help:** - -* Name: `--help` -* Shortcut: `-h` -* Accept value: no -* Is value required: no -* Is multiple: no -* Description: Display this help message -* Default: `false` - -**quiet:** - -* Name: `--quiet` -* Shortcut: `-q` -* Accept value: no -* Is value required: no -* Is multiple: no -* Description: Do not output any message -* Default: `false` - -**verbose:** - -* Name: `--verbose` -* Shortcut: `-v|-vv|-vvv` -* Accept value: no -* Is value required: no -* Is multiple: no -* Description: Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug -* Default: `false` - -**version:** - -* Name: `--version` -* Shortcut: `-V` -* Accept value: no -* Is value required: no -* Is multiple: no -* Description: Display this application version -* Default: `false` - -**ansi:** - -* Name: `--ansi` -* Shortcut: <none> -* Accept value: no -* Is value required: no -* Is multiple: no -* Description: Force ANSI output -* Default: `false` - -**no-ansi:** - -* Name: `--no-ansi` -* Shortcut: <none> -* Accept value: no -* Is value required: no -* Is multiple: no -* Description: Disable ANSI output -* Default: `false` - -**no-interaction:** - -* Name: `--no-interaction` -* Shortcut: `-n` -* Accept value: no -* Is value required: no -* Is multiple: no -* Description: Do not ask any interactive question -* Default: `false` - -list ----- - -* Description: Lists commands -* Usage: `list [--xml] [--raw] [--format="..."] [namespace]` -* Aliases: <none> - -The <info>list</info> command lists all commands: - - <info>php app/console list</info> - -You can also display the commands for a specific namespace: - - <info>php app/console list test</info> - -You can also output the information in other formats by using the <comment>--format</comment> option: - - <info>php app/console list --format=xml</info> - -It's also possible to get raw list of commands (useful for embedding command runner): - - <info>php app/console list --raw</info> - -### Arguments: - -**namespace:** - -* Name: namespace -* Is required: no -* Is array: no -* Description: The namespace name -* Default: `NULL` - -### Options: - -**xml:** - -* Name: `--xml` -* Shortcut: <none> -* Accept value: no -* Is value required: no -* Is multiple: no -* Description: To output list as XML -* Default: `false` - -**raw:** - -* Name: `--raw` -* Shortcut: <none> -* Accept value: no -* Is value required: no -* Is multiple: no -* Description: To output raw command list -* Default: `false` - -**format:** - -* Name: `--format` -* Shortcut: <none> -* Accept value: yes -* Is value required: yes -* Is multiple: no -* Description: To output list in other formats -* Default: `'txt'` - -descriptor:command1 -------------------- - -* Description: command 1 description -* Usage: `descriptor:command1` -* Aliases: `alias1`, `alias2` - -command 1 help - -### Options: - -**help:** - -* Name: `--help` -* Shortcut: `-h` -* Accept value: no -* Is value required: no -* Is multiple: no -* Description: Display this help message -* Default: `false` - -**quiet:** - -* Name: `--quiet` -* Shortcut: `-q` -* Accept value: no -* Is value required: no -* Is multiple: no -* Description: Do not output any message -* Default: `false` - -**verbose:** - -* Name: `--verbose` -* Shortcut: `-v|-vv|-vvv` -* Accept value: no -* Is value required: no -* Is multiple: no -* Description: Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug -* Default: `false` - -**version:** - -* Name: `--version` -* Shortcut: `-V` -* Accept value: no -* Is value required: no -* Is multiple: no -* Description: Display this application version -* Default: `false` - -**ansi:** - -* Name: `--ansi` -* Shortcut: <none> -* Accept value: no -* Is value required: no -* Is multiple: no -* Description: Force ANSI output -* Default: `false` - -**no-ansi:** - -* Name: `--no-ansi` -* Shortcut: <none> -* Accept value: no -* Is value required: no -* Is multiple: no -* Description: Disable ANSI output -* Default: `false` - -**no-interaction:** - -* Name: `--no-interaction` -* Shortcut: `-n` -* Accept value: no -* Is value required: no -* Is multiple: no -* Description: Do not ask any interactive question -* Default: `false` - -descriptor:command2 -------------------- - -* Description: command 2 description -* Usage: `descriptor:command2 [-o|--option_name] argument_name` -* Aliases: <none> - -command 2 help - -### Arguments: - -**argument_name:** - -* Name: argument_name -* Is required: yes -* Is array: no -* Description: <none> -* Default: `NULL` - -### Options: - -**option_name:** - -* Name: `--option_name` -* Shortcut: `-o` -* Accept value: no -* Is value required: no -* Is multiple: no -* Description: <none> -* Default: `false` - -**help:** - -* Name: `--help` -* Shortcut: `-h` -* Accept value: no -* Is value required: no -* Is multiple: no -* Description: Display this help message -* Default: `false` - -**quiet:** - -* Name: `--quiet` -* Shortcut: `-q` -* Accept value: no -* Is value required: no -* Is multiple: no -* Description: Do not output any message -* Default: `false` - -**verbose:** - -* Name: `--verbose` -* Shortcut: `-v|-vv|-vvv` -* Accept value: no -* Is value required: no -* Is multiple: no -* Description: Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug -* Default: `false` - -**version:** - -* Name: `--version` -* Shortcut: `-V` -* Accept value: no -* Is value required: no -* Is multiple: no -* Description: Display this application version -* Default: `false` - -**ansi:** - -* Name: `--ansi` -* Shortcut: <none> -* Accept value: no -* Is value required: no -* Is multiple: no -* Description: Force ANSI output -* Default: `false` - -**no-ansi:** - -* Name: `--no-ansi` -* Shortcut: <none> -* Accept value: no -* Is value required: no -* Is multiple: no -* Description: Disable ANSI output -* Default: `false` - -**no-interaction:** - -* Name: `--no-interaction` -* Shortcut: `-n` -* Accept value: no -* Is value required: no -* Is multiple: no -* Description: Do not ask any interactive question -* Default: `false` diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/application_2.txt b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/application_2.txt deleted file mode 100644 index a640a8d..0000000 --- a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/application_2.txt +++ /dev/null @@ -1,22 +0,0 @@ -<info>My Symfony application</info> version <comment>v1.0</comment> - -<comment>Usage:</comment> - command [options] [arguments] - -<comment>Options:</comment> - <info>--help</info> (-h) Display this help message - <info>--quiet</info> (-q) Do not output any message - <info>--verbose</info> (-v|vv|vvv) Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug - <info>--version</info> (-V) Display this application version - <info>--ansi</info> Force ANSI output - <info>--no-ansi</info> Disable ANSI output - <info>--no-interaction</info> (-n) Do not ask any interactive question - -<comment>Available commands:</comment> - <info>alias1 </info> command 1 description - <info>alias2 </info> command 1 description - <info>help </info> Displays help for a command - <info>list </info> Lists commands -<comment>descriptor</comment> - <info>descriptor:command1 </info> command 1 description - <info>descriptor:command2 </info> command 2 description diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/application_2.xml b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/application_2.xml deleted file mode 100644 index a7d65b4..0000000 --- a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/application_2.xml +++ /dev/null @@ -1,185 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<symfony name="My Symfony application" version="v1.0"> - <commands> - <command id="help" name="help"> - <usage>help [--xml] [--format="..."] [--raw] [command_name]</usage> - <description>Displays help for a command</description> - <help>The <info>help</info> command displays help for a given command: - - <info>php app/console help list</info> - - You can also output the help in other formats by using the <comment>--format</comment> option: - - <info>php app/console help --format=xml list</info> - - To display the list of available commands, please use the <info>list</info> command.</help> - <aliases/> - <arguments> - <argument name="command_name" is_required="0" is_array="0"> - <description>The command name</description> - <defaults> - <default>help</default> - </defaults> - </argument> - </arguments> - <options> - <option name="--xml" shortcut="" accept_value="0" is_value_required="0" is_multiple="0"> - <description>To output help as XML</description> - </option> - <option name="--format" shortcut="" accept_value="1" is_value_required="1" is_multiple="0"> - <description>To output help in other formats</description> - <defaults> - <default>txt</default> - </defaults> - </option> - <option name="--raw" shortcut="" accept_value="0" is_value_required="0" is_multiple="0"> - <description>To output raw command help</description> - </option> - <option name="--help" shortcut="-h" accept_value="0" is_value_required="0" is_multiple="0"> - <description>Display this help message</description> - </option> - <option name="--quiet" shortcut="-q" accept_value="0" is_value_required="0" is_multiple="0"> - <description>Do not output any message</description> - </option> - <option name="--verbose" shortcut="-v" shortcuts="-v|-vv|-vvv" accept_value="0" is_value_required="0" is_multiple="0"> - <description>Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug</description> - </option> - <option name="--version" shortcut="-V" accept_value="0" is_value_required="0" is_multiple="0"> - <description>Display this application version</description> - </option> - <option name="--ansi" shortcut="" accept_value="0" is_value_required="0" is_multiple="0"> - <description>Force ANSI output</description> - </option> - <option name="--no-ansi" shortcut="" accept_value="0" is_value_required="0" is_multiple="0"> - <description>Disable ANSI output</description> - </option> - <option name="--no-interaction" shortcut="-n" accept_value="0" is_value_required="0" is_multiple="0"> - <description>Do not ask any interactive question</description> - </option> - </options> - </command> - <command id="list" name="list"> - <usage>list [--xml] [--raw] [--format="..."] [namespace]</usage> - <description>Lists commands</description> - <help>The <info>list</info> command lists all commands: - - <info>php app/console list</info> - - You can also display the commands for a specific namespace: - - <info>php app/console list test</info> - - You can also output the information in other formats by using the <comment>--format</comment> option: - - <info>php app/console list --format=xml</info> - - It's also possible to get raw list of commands (useful for embedding command runner): - - <info>php app/console list --raw</info></help> - <aliases/> - <arguments> - <argument name="namespace" is_required="0" is_array="0"> - <description>The namespace name</description> - <defaults/> - </argument> - </arguments> - <options> - <option name="--xml" shortcut="" accept_value="0" is_value_required="0" is_multiple="0"> - <description>To output list as XML</description> - </option> - <option name="--raw" shortcut="" accept_value="0" is_value_required="0" is_multiple="0"> - <description>To output raw command list</description> - </option> - <option name="--format" shortcut="" accept_value="1" is_value_required="1" is_multiple="0"> - <description>To output list in other formats</description> - <defaults> - <default>txt</default> - </defaults> - </option> - </options> - </command> - <command id="descriptor:command1" name="descriptor:command1"> - <usage>descriptor:command1</usage> - <description>command 1 description</description> - <help>command 1 help</help> - <aliases> - <alias>alias1</alias> - <alias>alias2</alias> - </aliases> - <arguments/> - <options> - <option name="--help" shortcut="-h" accept_value="0" is_value_required="0" is_multiple="0"> - <description>Display this help message</description> - </option> - <option name="--quiet" shortcut="-q" accept_value="0" is_value_required="0" is_multiple="0"> - <description>Do not output any message</description> - </option> - <option name="--verbose" shortcut="-v" shortcuts="-v|-vv|-vvv" accept_value="0" is_value_required="0" is_multiple="0"> - <description>Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug</description> - </option> - <option name="--version" shortcut="-V" accept_value="0" is_value_required="0" is_multiple="0"> - <description>Display this application version</description> - </option> - <option name="--ansi" shortcut="" accept_value="0" is_value_required="0" is_multiple="0"> - <description>Force ANSI output</description> - </option> - <option name="--no-ansi" shortcut="" accept_value="0" is_value_required="0" is_multiple="0"> - <description>Disable ANSI output</description> - </option> - <option name="--no-interaction" shortcut="-n" accept_value="0" is_value_required="0" is_multiple="0"> - <description>Do not ask any interactive question</description> - </option> - </options> - </command> - <command id="descriptor:command2" name="descriptor:command2"> - <usage>descriptor:command2 [-o|--option_name] argument_name</usage> - <description>command 2 description</description> - <help>command 2 help</help> - <aliases/> - <arguments> - <argument name="argument_name" is_required="1" is_array="0"> - <description></description> - <defaults/> - </argument> - </arguments> - <options> - <option name="--option_name" shortcut="-o" accept_value="0" is_value_required="0" is_multiple="0"> - <description></description> - </option> - <option name="--help" shortcut="-h" accept_value="0" is_value_required="0" is_multiple="0"> - <description>Display this help message</description> - </option> - <option name="--quiet" shortcut="-q" accept_value="0" is_value_required="0" is_multiple="0"> - <description>Do not output any message</description> - </option> - <option name="--verbose" shortcut="-v" shortcuts="-v|-vv|-vvv" accept_value="0" is_value_required="0" is_multiple="0"> - <description>Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug</description> - </option> - <option name="--version" shortcut="-V" accept_value="0" is_value_required="0" is_multiple="0"> - <description>Display this application version</description> - </option> - <option name="--ansi" shortcut="" accept_value="0" is_value_required="0" is_multiple="0"> - <description>Force ANSI output</description> - </option> - <option name="--no-ansi" shortcut="" accept_value="0" is_value_required="0" is_multiple="0"> - <description>Disable ANSI output</description> - </option> - <option name="--no-interaction" shortcut="-n" accept_value="0" is_value_required="0" is_multiple="0"> - <description>Do not ask any interactive question</description> - </option> - </options> - </command> - </commands> - <namespaces> - <namespace id="_global"> - <command>alias1</command> - <command>alias2</command> - <command>help</command> - <command>list</command> - </namespace> - <namespace id="descriptor"> - <command>descriptor:command1</command> - <command>descriptor:command2</command> - </namespace> - </namespaces> -</symfony> diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/application_astext1.txt b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/application_astext1.txt deleted file mode 100644 index d9734fe..0000000 --- a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/application_astext1.txt +++ /dev/null @@ -1,20 +0,0 @@ -<info>Console Tool</info> - -<comment>Usage:</comment> - command [options] [arguments] - -<comment>Options:</comment> - <info>--help</info> (-h) Display this help message - <info>--quiet</info> (-q) Do not output any message - <info>--verbose</info> (-v|vv|vvv) Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug - <info>--version</info> (-V) Display this application version - <info>--ansi</info> Force ANSI output - <info>--no-ansi</info> Disable ANSI output - <info>--no-interaction</info> (-n) Do not ask any interactive question - -<comment>Available commands:</comment> - <info>afoobar </info> The foo:bar command - <info>help </info> Displays help for a command - <info>list </info> Lists commands -<comment>foo</comment> - <info>foo:bar </info> The foo:bar command diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/application_astext2.txt b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/application_astext2.txt deleted file mode 100644 index 49992cf..0000000 --- a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/application_astext2.txt +++ /dev/null @@ -1,16 +0,0 @@ -<info>Console Tool</info> - -<comment>Usage:</comment> - command [options] [arguments] - -<comment>Options:</comment> - <info>--help</info> (-h) Display this help message - <info>--quiet</info> (-q) Do not output any message - <info>--verbose</info> (-v|vv|vvv) Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug - <info>--version</info> (-V) Display this application version - <info>--ansi</info> Force ANSI output - <info>--no-ansi</info> Disable ANSI output - <info>--no-interaction</info> (-n) Do not ask any interactive question - -<comment>Available commands for the "foo" namespace:</comment> - <info>foo:bar </info> The foo:bar command diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/application_asxml1.txt b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/application_asxml1.txt deleted file mode 100644 index d956781..0000000 --- a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/application_asxml1.txt +++ /dev/null @@ -1,144 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<symfony> - <commands> - <command id="help" name="help"> - <usage>help [--xml] [--format="..."] [--raw] [command_name]</usage> - <description>Displays help for a command</description> - <help>The <info>help</info> command displays help for a given command: - - <info>php app/console help list</info> - - You can also output the help in other formats by using the <comment>--format</comment> option: - - <info>php app/console help --format=xml list</info> - - To display the list of available commands, please use the <info>list</info> command.</help> - <aliases /> - <arguments> - <argument name="command_name" is_required="0" is_array="0"> - <description>The command name</description> - <defaults> - <default>help</default> - </defaults> - </argument> - </arguments> - <options> - <option name="--xml" shortcut="" accept_value="0" is_value_required="0" is_multiple="0"> - <description>To output help as XML</description> - </option> - <option name="--format" shortcut="" accept_value="1" is_value_required="1" is_multiple="0"> - <description>To output help in other formats</description> - <defaults> - <default>txt</default> - </defaults> - </option> - <option name="--raw" shortcut="" accept_value="0" is_value_required="0" is_multiple="0"> - <description>To output raw command help</description> - </option> - <option name="--help" shortcut="-h" accept_value="0" is_value_required="0" is_multiple="0"> - <description>Display this help message</description> - </option> - <option name="--quiet" shortcut="-q" accept_value="0" is_value_required="0" is_multiple="0"> - <description>Do not output any message</description> - </option> - <option name="--verbose" shortcut="-v" shortcuts="-v|-vv|-vvv" accept_value="0" is_value_required="0" is_multiple="0"> - <description>Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug</description> - </option> - <option name="--version" shortcut="-V" accept_value="0" is_value_required="0" is_multiple="0"> - <description>Display this application version</description> - </option> - <option name="--ansi" shortcut="" accept_value="0" is_value_required="0" is_multiple="0"> - <description>Force ANSI output</description> - </option> - <option name="--no-ansi" shortcut="" accept_value="0" is_value_required="0" is_multiple="0"> - <description>Disable ANSI output</description> - </option> - <option name="--no-interaction" shortcut="-n" accept_value="0" is_value_required="0" is_multiple="0"> - <description>Do not ask any interactive question</description> - </option> - </options> -</command> - <command id="list" name="list"> - <usage>list [--xml] [--raw] [--format="..."] [namespace]</usage> - <description>Lists commands</description> - <help>The <info>list</info> command lists all commands: - - <info>php app/console list</info> - - You can also display the commands for a specific namespace: - - <info>php app/console list test</info> - - You can also output the information in other formats by using the <comment>--format</comment> option: - - <info>php app/console list --format=xml</info> - - It's also possible to get raw list of commands (useful for embedding command runner): - - <info>php app/console list --raw</info></help> - <aliases/> - <arguments> - <argument name="namespace" is_required="0" is_array="0"> - <description>The namespace name</description> - <defaults/> - </argument> - </arguments> - <options> - <option name="--xml" shortcut="" accept_value="0" is_value_required="0" is_multiple="0"> - <description>To output list as XML</description> - </option> - <option name="--raw" shortcut="" accept_value="0" is_value_required="0" is_multiple="0"> - <description>To output raw command list</description> - </option> - <option name="--format" shortcut="" accept_value="1" is_value_required="1" is_multiple="0"> - <description>To output list in other formats</description> - <defaults> - <default>txt</default> - </defaults> - </option> - </options> -</command> - <command id="foo:bar" name="foo:bar"> - <usage>foo:bar</usage> - <description>The foo:bar command</description> - <help/> - <aliases> - <alias>afoobar</alias> - </aliases> - <arguments/> - <options> - <option name="--help" shortcut="-h" accept_value="0" is_value_required="0" is_multiple="0"> - <description>Display this help message</description> - </option> - <option name="--quiet" shortcut="-q" accept_value="0" is_value_required="0" is_multiple="0"> - <description>Do not output any message</description> - </option> - <option name="--verbose" shortcut="-v" shortcuts="-v|-vv|-vvv" accept_value="0" is_value_required="0" is_multiple="0"> - <description>Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug</description> - </option> - <option name="--version" shortcut="-V" accept_value="0" is_value_required="0" is_multiple="0"> - <description>Display this application version</description> - </option> - <option name="--ansi" shortcut="" accept_value="0" is_value_required="0" is_multiple="0"> - <description>Force ANSI output</description> - </option> - <option name="--no-ansi" shortcut="" accept_value="0" is_value_required="0" is_multiple="0"> - <description>Disable ANSI output</description> - </option> - <option name="--no-interaction" shortcut="-n" accept_value="0" is_value_required="0" is_multiple="0"> - <description>Do not ask any interactive question</description> - </option> - </options> -</command> - </commands> - <namespaces> - <namespace id="_global"> - <command>afoobar</command> - <command>help</command> - <command>list</command> - </namespace> - <namespace id="foo"> - <command>foo:bar</command> - </namespace> - </namespaces> -</symfony> diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/application_asxml2.txt b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/application_asxml2.txt deleted file mode 100644 index 0b30b20..0000000 --- a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/application_asxml2.txt +++ /dev/null @@ -1,37 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<symfony> - <commands namespace="foo"> - <command id="foo:bar" name="foo:bar"> - <usage>foo:bar</usage> - <description>The foo:bar command</description> - <help/> - <aliases> - <alias>afoobar</alias> - </aliases> - <arguments/> - <options> - <option name="--help" shortcut="-h" accept_value="0" is_value_required="0" is_multiple="0"> - <description>Display this help message</description> - </option> - <option name="--quiet" shortcut="-q" accept_value="0" is_value_required="0" is_multiple="0"> - <description>Do not output any message</description> - </option> - <option name="--verbose" shortcut="-v" shortcuts="-v|-vv|-vvv" accept_value="0" is_value_required="0" is_multiple="0"> - <description>Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug</description> - </option> - <option name="--version" shortcut="-V" accept_value="0" is_value_required="0" is_multiple="0"> - <description>Display this application version</description> - </option> - <option name="--ansi" shortcut="" accept_value="0" is_value_required="0" is_multiple="0"> - <description>Force ANSI output</description> - </option> - <option name="--no-ansi" shortcut="" accept_value="0" is_value_required="0" is_multiple="0"> - <description>Disable ANSI output</description> - </option> - <option name="--no-interaction" shortcut="-n" accept_value="0" is_value_required="0" is_multiple="0"> - <description>Do not ask any interactive question</description> - </option> - </options> -</command> - </commands> -</symfony> diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/application_gethelp.txt b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/application_gethelp.txt deleted file mode 100644 index 0c16e3c..0000000 --- a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/application_gethelp.txt +++ /dev/null @@ -1 +0,0 @@ -<info>Console Tool</info>
\ No newline at end of file diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/application_renderexception1.txt b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/application_renderexception1.txt deleted file mode 100644 index 4629345..0000000 --- a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/application_renderexception1.txt +++ /dev/null @@ -1,8 +0,0 @@ - - - - [InvalidArgumentException] - Command "foo" is not defined. - - - diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/application_renderexception2.txt b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/application_renderexception2.txt deleted file mode 100644 index c758129..0000000 --- a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/application_renderexception2.txt +++ /dev/null @@ -1,11 +0,0 @@ - - - - [InvalidArgumentException] - The "--foo" option does not exist. - - - -list [--xml] [--raw] [--format="..."] [namespace] - - diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/application_renderexception3.txt b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/application_renderexception3.txt deleted file mode 100644 index 72a7286..0000000 --- a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/application_renderexception3.txt +++ /dev/null @@ -1,27 +0,0 @@ - - - - [Exception] - Third exception comment - - - - - - - [Exception] - Second exception comment - - - - - - - [Exception] - First exception <p>this is html</p> - - - -foo3:bar - - diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/application_renderexception3decorated.txt b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/application_renderexception3decorated.txt deleted file mode 100644 index b44d50b..0000000 --- a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/application_renderexception3decorated.txt +++ /dev/null @@ -1,27 +0,0 @@ - - -[37;41m [39;49m -[37;41m [Exception] [39;49m -[37;41m Third exception [39;49m[34;41mcomment[39;49m[37;41m [39;49m -[37;41m [39;49m - - - - -[37;41m [39;49m -[37;41m [Exception] [39;49m -[37;41m Second exception [39;49m[33mcomment[39m[37;41m [39;49m -[37;41m [39;49m - - - - -[37;41m [39;49m -[37;41m [Exception] [39;49m -[37;41m First exception [39;49m[37;41m<p>[39;49m[37;41mthis is html[39;49m[37;41m</p>[39;49m[37;41m [39;49m -[37;41m [39;49m - - -[32mfoo3:bar[39m - - diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/application_renderexception4.txt b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/application_renderexception4.txt deleted file mode 100644 index 19f893b..0000000 --- a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/application_renderexception4.txt +++ /dev/null @@ -1,9 +0,0 @@ - - - - [InvalidArgumentException] - Command "foo" is not define - d. - - - diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/application_renderexception_doublewidth1.txt b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/application_renderexception_doublewidth1.txt deleted file mode 100644 index 6a98660..0000000 --- a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/application_renderexception_doublewidth1.txt +++ /dev/null @@ -1,11 +0,0 @@ - - - - [Exception] - エラーメッセージ - - - -foo - - diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/application_renderexception_doublewidth1decorated.txt b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/application_renderexception_doublewidth1decorated.txt deleted file mode 100644 index 8c8801b..0000000 --- a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/application_renderexception_doublewidth1decorated.txt +++ /dev/null @@ -1,11 +0,0 @@ - - -[37;41m [39;49m -[37;41m [Exception] [39;49m -[37;41m エラーメッセージ [39;49m -[37;41m [39;49m - - -[32mfoo[39m - - diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/application_renderexception_doublewidth2.txt b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/application_renderexception_doublewidth2.txt deleted file mode 100644 index 545cd7b..0000000 --- a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/application_renderexception_doublewidth2.txt +++ /dev/null @@ -1,12 +0,0 @@ - - - - [Exception] - コマンドの実行中にエラーが - 発生しました。 - - - -foo - - diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/application_run1.txt b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/application_run1.txt deleted file mode 100644 index 9bd08b5..0000000 --- a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/application_run1.txt +++ /dev/null @@ -1,17 +0,0 @@ -Console Tool - -Usage: - command [options] [arguments] - -Options: - --help (-h) Display this help message - --quiet (-q) Do not output any message - --verbose (-v|vv|vvv) Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug - --version (-V) Display this application version - --ansi Force ANSI output - --no-ansi Disable ANSI output - --no-interaction (-n) Do not ask any interactive question - -Available commands: - help Displays help for a command - list Lists commands diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/application_run2.txt b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/application_run2.txt deleted file mode 100644 index 6963c0f..0000000 --- a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/application_run2.txt +++ /dev/null @@ -1,29 +0,0 @@ -Usage: - help [--xml] [--format="..."] [--raw] [command_name] - -Arguments: - command The command to execute - command_name The command name (default: "help") - -Options: - --xml To output help as XML - --format To output help in other formats (default: "txt") - --raw To output raw command help - --help (-h) Display this help message - --quiet (-q) Do not output any message - --verbose (-v|vv|vvv) Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug - --version (-V) Display this application version - --ansi Force ANSI output - --no-ansi Disable ANSI output - --no-interaction (-n) Do not ask any interactive question - -Help: - The help command displays help for a given command: - - php app/console help list - - You can also output the help in other formats by using the --format option: - - php app/console help --format=xml list - - To display the list of available commands, please use the list command. diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/application_run3.txt b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/application_run3.txt deleted file mode 100644 index 0139775..0000000 --- a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/application_run3.txt +++ /dev/null @@ -1,27 +0,0 @@ -Usage: - list [--xml] [--raw] [--format="..."] [namespace] - -Arguments: - namespace The namespace name - -Options: - --xml To output list as XML - --raw To output raw command list - --format To output list in other formats (default: "txt") - -Help: - The list command lists all commands: - - php app/console list - - You can also display the commands for a specific namespace: - - php app/console list test - - You can also output the information in other formats by using the --format option: - - php app/console list --format=xml - - It's also possible to get raw list of commands (useful for embedding command runner): - - php app/console list --raw diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/application_run4.txt b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/application_run4.txt deleted file mode 100644 index 47187fc..0000000 --- a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/application_run4.txt +++ /dev/null @@ -1 +0,0 @@ -Console Tool diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/command_1.json b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/command_1.json deleted file mode 100644 index 0c1675d..0000000 --- a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/command_1.json +++ /dev/null @@ -1 +0,0 @@ -{"name":"descriptor:command1","usage":"descriptor:command1","description":"command 1 description","help":"command 1 help","aliases":["alias1","alias2"],"definition":{"arguments":[],"options":[]}} diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/command_1.md b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/command_1.md deleted file mode 100644 index 2cef9a2..0000000 --- a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/command_1.md +++ /dev/null @@ -1,8 +0,0 @@ -descriptor:command1 -------------------- - -* Description: command 1 description -* Usage: `descriptor:command1` -* Aliases: `alias1`, `alias2` - -command 1 help diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/command_1.txt b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/command_1.txt deleted file mode 100644 index 2375ac0..0000000 --- a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/command_1.txt +++ /dev/null @@ -1,7 +0,0 @@ -<comment>Usage:</comment> - descriptor:command1 - -<comment>Aliases:</comment> <info>alias1, alias2</info> - -<comment>Help:</comment> - command 1 help diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/command_1.xml b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/command_1.xml deleted file mode 100644 index dcfa6fa..0000000 --- a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/command_1.xml +++ /dev/null @@ -1,12 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<command id="descriptor:command1" name="descriptor:command1"> - <usage>descriptor:command1</usage> - <description>command 1 description</description> - <help>command 1 help</help> - <aliases> - <alias>alias1</alias> - <alias>alias2</alias> - </aliases> - <arguments/> - <options/> -</command> diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/command_2.json b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/command_2.json deleted file mode 100644 index 493b584..0000000 --- a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/command_2.json +++ /dev/null @@ -1 +0,0 @@ -{"name":"descriptor:command2","usage":"descriptor:command2 [-o|--option_name] argument_name","description":"command 2 description","help":"command 2 help","aliases":[],"definition":{"arguments":{"argument_name":{"name":"argument_name","is_required":true,"is_array":false,"description":"","default":null}},"options":{"option_name":{"name":"--option_name","shortcut":"-o","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"","default":false}}}} diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/command_2.md b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/command_2.md deleted file mode 100644 index 5257c0d..0000000 --- a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/command_2.md +++ /dev/null @@ -1,30 +0,0 @@ -descriptor:command2 -------------------- - -* Description: command 2 description -* Usage: `descriptor:command2 [-o|--option_name] argument_name` -* Aliases: <none> - -command 2 help - -### Arguments: - -**argument_name:** - -* Name: argument_name -* Is required: yes -* Is array: no -* Description: <none> -* Default: `NULL` - -### Options: - -**option_name:** - -* Name: `--option_name` -* Shortcut: `-o` -* Accept value: no -* Is value required: no -* Is multiple: no -* Description: <none> -* Default: `false` diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/command_2.txt b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/command_2.txt deleted file mode 100644 index 1da9f3d..0000000 --- a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/command_2.txt +++ /dev/null @@ -1,11 +0,0 @@ -<comment>Usage:</comment> - descriptor:command2 [-o|--option_name] argument_name - -<comment>Arguments:</comment> - <info>argument_name </info> - -<comment>Options:</comment> - <info>--option_name</info> (-o) - -<comment>Help:</comment> - command 2 help diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/command_2.xml b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/command_2.xml deleted file mode 100644 index c411c36..0000000 --- a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/command_2.xml +++ /dev/null @@ -1,18 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<command id="descriptor:command2" name="descriptor:command2"> - <usage>descriptor:command2 [-o|--option_name] argument_name</usage> - <description>command 2 description</description> - <help>command 2 help</help> - <aliases/> - <arguments> - <argument name="argument_name" is_required="1" is_array="0"> - <description></description> - <defaults/> - </argument> - </arguments> - <options> - <option name="--option_name" shortcut="-o" accept_value="0" is_value_required="0" is_multiple="0"> - <description></description> - </option> - </options> -</command> diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/command_astext.txt b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/command_astext.txt deleted file mode 100644 index 5d70351..0000000 --- a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/command_astext.txt +++ /dev/null @@ -1,18 +0,0 @@ -<comment>Usage:</comment> - namespace:name - -<comment>Aliases:</comment> <info>name</info> -<comment>Arguments:</comment> - <info>command </info> The command to execute - -<comment>Options:</comment> - <info>--help</info> (-h) Display this help message - <info>--quiet</info> (-q) Do not output any message - <info>--verbose</info> (-v|vv|vvv) Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug - <info>--version</info> (-V) Display this application version - <info>--ansi</info> Force ANSI output - <info>--no-ansi</info> Disable ANSI output - <info>--no-interaction</info> (-n) Do not ask any interactive question - -<comment>Help:</comment> - help diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/command_asxml.txt b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/command_asxml.txt deleted file mode 100644 index 57542fa..0000000 --- a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/command_asxml.txt +++ /dev/null @@ -1,38 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<command id="namespace:name" name="namespace:name"> - <usage>namespace:name</usage> - <description>description</description> - <help>help</help> - <aliases> - <alias>name</alias> - </aliases> - <arguments> - <argument name="command" is_required="1" is_array="0"> - <description>The command to execute</description> - <defaults/> - </argument> - </arguments> - <options> - <option name="--help" shortcut="-h" accept_value="0" is_value_required="0" is_multiple="0"> - <description>Display this help message</description> - </option> - <option name="--quiet" shortcut="-q" accept_value="0" is_value_required="0" is_multiple="0"> - <description>Do not output any message</description> - </option> - <option name="--verbose" shortcut="-v" shortcuts="-v|-vv|-vvv" accept_value="0" is_value_required="0" is_multiple="0"> - <description>Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug</description> - </option> - <option name="--version" shortcut="-V" accept_value="0" is_value_required="0" is_multiple="0"> - <description>Display this application version</description> - </option> - <option name="--ansi" shortcut="" accept_value="0" is_value_required="0" is_multiple="0"> - <description>Force ANSI output</description> - </option> - <option name="--no-ansi" shortcut="" accept_value="0" is_value_required="0" is_multiple="0"> - <description>Disable ANSI output</description> - </option> - <option name="--no-interaction" shortcut="-n" accept_value="0" is_value_required="0" is_multiple="0"> - <description>Do not ask any interactive question</description> - </option> - </options> -</command> diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/definition_astext.txt b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/definition_astext.txt deleted file mode 100644 index a7d7e0d..0000000 --- a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/definition_astext.txt +++ /dev/null @@ -1,11 +0,0 @@ -<comment>Arguments:</comment> - <info>foo </info> The foo argument - <info>baz </info> The baz argument<comment> (default: true)</comment> - <info>bar </info> The bar argument<comment> (default: ["http://foo.com/"])</comment> - -<comment>Options:</comment> - <info>--foo</info> (-f) The foo option - <info>--baz</info> The baz option<comment> (default: false)</comment> - <info>--bar</info> (-b) The bar option<comment> (default: "bar")</comment> - <info>--qux</info> The qux option<comment> (default: ["http://foo.com/","bar"])</comment><comment> (multiple values allowed)</comment> - <info>--qux2</info> The qux2 option<comment> (default: {"foo":"bar"})</comment><comment> (multiple values allowed)</comment> diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/definition_asxml.txt b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/definition_asxml.txt deleted file mode 100644 index eec8c07..0000000 --- a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/definition_asxml.txt +++ /dev/null @@ -1,39 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<definition> - <arguments> - <argument name="foo" is_required="0" is_array="0"> - <description>The foo argument</description> - <defaults/> - </argument> - <argument name="baz" is_required="0" is_array="0"> - <description>The baz argument</description> - <defaults> - <default>true</default> - </defaults> - </argument> - <argument name="bar" is_required="0" is_array="1"> - <description>The bar argument</description> - <defaults> - <default>bar</default> - </defaults> - </argument> - </arguments> - <options> - <option name="--foo" shortcut="-f" accept_value="1" is_value_required="1" is_multiple="0"> - <description>The foo option</description> - <defaults/> - </option> - <option name="--baz" shortcut="" accept_value="1" is_value_required="0" is_multiple="0"> - <description>The baz option</description> - <defaults> - <default>false</default> - </defaults> - </option> - <option name="--bar" shortcut="-b" accept_value="1" is_value_required="0" is_multiple="0"> - <description>The bar option</description> - <defaults> - <default>bar</default> - </defaults> - </option> - </options> -</definition> diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_argument_1.json b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_argument_1.json deleted file mode 100644 index b8173b6..0000000 --- a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_argument_1.json +++ /dev/null @@ -1 +0,0 @@ -{"name":"argument_name","is_required":true,"is_array":false,"description":"","default":null} diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_argument_1.md b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_argument_1.md deleted file mode 100644 index 88f311a..0000000 --- a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_argument_1.md +++ /dev/null @@ -1,7 +0,0 @@ -**argument_name:** - -* Name: argument_name -* Is required: yes -* Is array: no -* Description: <none> -* Default: `NULL` diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_argument_1.txt b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_argument_1.txt deleted file mode 100644 index 111e515..0000000 --- a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_argument_1.txt +++ /dev/null @@ -1 +0,0 @@ - <info>argument_name</info> diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_argument_1.xml b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_argument_1.xml deleted file mode 100644 index cb37f81..0000000 --- a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_argument_1.xml +++ /dev/null @@ -1,5 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<argument name="argument_name" is_required="1" is_array="0"> - <description></description> - <defaults/> -</argument> diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_argument_2.json b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_argument_2.json deleted file mode 100644 index ef06b09..0000000 --- a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_argument_2.json +++ /dev/null @@ -1 +0,0 @@ -{"name":"argument_name","is_required":false,"is_array":true,"description":"argument description","default":[]} diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_argument_2.md b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_argument_2.md deleted file mode 100644 index 3cdb00c..0000000 --- a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_argument_2.md +++ /dev/null @@ -1,7 +0,0 @@ -**argument_name:** - -* Name: argument_name -* Is required: no -* Is array: yes -* Description: argument description -* Default: `array ()` diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_argument_2.txt b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_argument_2.txt deleted file mode 100644 index 9497b1c..0000000 --- a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_argument_2.txt +++ /dev/null @@ -1 +0,0 @@ - <info>argument_name</info> argument description diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_argument_2.xml b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_argument_2.xml deleted file mode 100644 index 629da5a..0000000 --- a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_argument_2.xml +++ /dev/null @@ -1,5 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<argument name="argument_name" is_required="0" is_array="1"> - <description>argument description</description> - <defaults/> -</argument> diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_argument_3.json b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_argument_3.json deleted file mode 100644 index de8484e..0000000 --- a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_argument_3.json +++ /dev/null @@ -1 +0,0 @@ -{"name":"argument_name","is_required":false,"is_array":false,"description":"argument description","default":"default_value"} diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_argument_3.md b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_argument_3.md deleted file mode 100644 index be1c443..0000000 --- a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_argument_3.md +++ /dev/null @@ -1,7 +0,0 @@ -**argument_name:** - -* Name: argument_name -* Is required: no -* Is array: no -* Description: argument description -* Default: `'default_value'` diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_argument_3.txt b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_argument_3.txt deleted file mode 100644 index c421fc9..0000000 --- a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_argument_3.txt +++ /dev/null @@ -1 +0,0 @@ - <info>argument_name</info> argument description<comment> (default: "default_value")</comment> diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_argument_3.xml b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_argument_3.xml deleted file mode 100644 index 399a5c8..0000000 --- a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_argument_3.xml +++ /dev/null @@ -1,7 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<argument name="argument_name" is_required="0" is_array="0"> - <description>argument description</description> - <defaults> - <default>default_value</default> - </defaults> -</argument> diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_definition_1.json b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_definition_1.json deleted file mode 100644 index c7a7d83..0000000 --- a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_definition_1.json +++ /dev/null @@ -1 +0,0 @@ -{"arguments":[],"options":[]} diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_definition_1.md b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_definition_1.md deleted file mode 100644 index e69de29..0000000 --- a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_definition_1.md +++ /dev/null diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_definition_1.txt b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_definition_1.txt deleted file mode 100644 index e69de29..0000000 --- a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_definition_1.txt +++ /dev/null diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_definition_1.xml b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_definition_1.xml deleted file mode 100644 index b5481ce..0000000 --- a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_definition_1.xml +++ /dev/null @@ -1,5 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<definition> - <arguments/> - <options/> -</definition> diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_definition_2.json b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_definition_2.json deleted file mode 100644 index 9964a55..0000000 --- a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_definition_2.json +++ /dev/null @@ -1 +0,0 @@ -{"arguments":{"argument_name":{"name":"argument_name","is_required":true,"is_array":false,"description":"","default":null}},"options":[]} diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_definition_2.md b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_definition_2.md deleted file mode 100644 index 923191c..0000000 --- a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_definition_2.md +++ /dev/null @@ -1,9 +0,0 @@ -### Arguments: - -**argument_name:** - -* Name: argument_name -* Is required: yes -* Is array: no -* Description: <none> -* Default: `NULL` diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_definition_2.txt b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_definition_2.txt deleted file mode 100644 index 0db9f66..0000000 --- a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_definition_2.txt +++ /dev/null @@ -1,2 +0,0 @@ -<comment>Arguments:</comment> - <info>argument_name </info> diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_definition_2.xml b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_definition_2.xml deleted file mode 100644 index 102efc1..0000000 --- a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_definition_2.xml +++ /dev/null @@ -1,10 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<definition> - <arguments> - <argument name="argument_name" is_required="1" is_array="0"> - <description></description> - <defaults/> - </argument> - </arguments> - <options/> -</definition> diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_definition_3.json b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_definition_3.json deleted file mode 100644 index 6a86056..0000000 --- a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_definition_3.json +++ /dev/null @@ -1 +0,0 @@ -{"arguments":[],"options":{"option_name":{"name":"--option_name","shortcut":"-o","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"","default":false}}} diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_definition_3.md b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_definition_3.md deleted file mode 100644 index 40fd7b0..0000000 --- a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_definition_3.md +++ /dev/null @@ -1,11 +0,0 @@ -### Options: - -**option_name:** - -* Name: `--option_name` -* Shortcut: `-o` -* Accept value: no -* Is value required: no -* Is multiple: no -* Description: <none> -* Default: `false` diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_definition_3.txt b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_definition_3.txt deleted file mode 100644 index c6fb2cc..0000000 --- a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_definition_3.txt +++ /dev/null @@ -1,2 +0,0 @@ -<comment>Options:</comment> - <info>--option_name</info> (-o) diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_definition_3.xml b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_definition_3.xml deleted file mode 100644 index bc95151..0000000 --- a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_definition_3.xml +++ /dev/null @@ -1,9 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<definition> - <arguments/> - <options> - <option name="--option_name" shortcut="-o" accept_value="0" is_value_required="0" is_multiple="0"> - <description></description> - </option> - </options> -</definition> diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_definition_4.json b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_definition_4.json deleted file mode 100644 index c5a0019..0000000 --- a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_definition_4.json +++ /dev/null @@ -1 +0,0 @@ -{"arguments":{"argument_name":{"name":"argument_name","is_required":true,"is_array":false,"description":"","default":null}},"options":{"option_name":{"name":"--option_name","shortcut":"-o","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"","default":false}}} diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_definition_4.md b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_definition_4.md deleted file mode 100644 index a31feea..0000000 --- a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_definition_4.md +++ /dev/null @@ -1,21 +0,0 @@ -### Arguments: - -**argument_name:** - -* Name: argument_name -* Is required: yes -* Is array: no -* Description: <none> -* Default: `NULL` - -### Options: - -**option_name:** - -* Name: `--option_name` -* Shortcut: `-o` -* Accept value: no -* Is value required: no -* Is multiple: no -* Description: <none> -* Default: `false` diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_definition_4.txt b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_definition_4.txt deleted file mode 100644 index e17c61c..0000000 --- a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_definition_4.txt +++ /dev/null @@ -1,5 +0,0 @@ -<comment>Arguments:</comment> - <info>argument_name </info> - -<comment>Options:</comment> - <info>--option_name</info> (-o) diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_definition_4.xml b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_definition_4.xml deleted file mode 100644 index cffceec..0000000 --- a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_definition_4.xml +++ /dev/null @@ -1,14 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<definition> - <arguments> - <argument name="argument_name" is_required="1" is_array="0"> - <description></description> - <defaults/> - </argument> - </arguments> - <options> - <option name="--option_name" shortcut="-o" accept_value="0" is_value_required="0" is_multiple="0"> - <description></description> - </option> - </options> -</definition> diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_option_1.json b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_option_1.json deleted file mode 100644 index 60c5b56..0000000 --- a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_option_1.json +++ /dev/null @@ -1 +0,0 @@ -{"name":"--option_name","shortcut":"-o","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"","default":false} diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_option_1.md b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_option_1.md deleted file mode 100644 index 6f9e9a7..0000000 --- a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_option_1.md +++ /dev/null @@ -1,9 +0,0 @@ -**option_name:** - -* Name: `--option_name` -* Shortcut: `-o` -* Accept value: no -* Is value required: no -* Is multiple: no -* Description: <none> -* Default: `false` diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_option_1.txt b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_option_1.txt deleted file mode 100644 index daf83d0..0000000 --- a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_option_1.txt +++ /dev/null @@ -1 +0,0 @@ - <info>--option_name</info> (-o) diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_option_1.xml b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_option_1.xml deleted file mode 100644 index 8a64ea6..0000000 --- a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_option_1.xml +++ /dev/null @@ -1,4 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<option name="--option_name" shortcut="-o" accept_value="0" is_value_required="0" is_multiple="0"> - <description></description> -</option> diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_option_2.json b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_option_2.json deleted file mode 100644 index 04e4228..0000000 --- a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_option_2.json +++ /dev/null @@ -1 +0,0 @@ -{"name":"--option_name","shortcut":"-o","accept_value":true,"is_value_required":false,"is_multiple":false,"description":"option description","default":"default_value"} diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_option_2.md b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_option_2.md deleted file mode 100644 index 634ac0b..0000000 --- a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_option_2.md +++ /dev/null @@ -1,9 +0,0 @@ -**option_name:** - -* Name: `--option_name` -* Shortcut: `-o` -* Accept value: yes -* Is value required: no -* Is multiple: no -* Description: option description -* Default: `'default_value'` diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_option_2.txt b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_option_2.txt deleted file mode 100644 index 627e3c1..0000000 --- a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_option_2.txt +++ /dev/null @@ -1 +0,0 @@ - <info>--option_name</info> (-o) option description<comment> (default: "default_value")</comment> diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_option_2.xml b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_option_2.xml deleted file mode 100644 index 4afac5b..0000000 --- a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_option_2.xml +++ /dev/null @@ -1,7 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<option name="--option_name" shortcut="-o" accept_value="1" is_value_required="0" is_multiple="0"> - <description>option description</description> - <defaults> - <default>default_value</default> - </defaults> -</option> diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_option_3.json b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_option_3.json deleted file mode 100644 index c1ea120..0000000 --- a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_option_3.json +++ /dev/null @@ -1 +0,0 @@ -{"name":"--option_name","shortcut":"-o","accept_value":true,"is_value_required":true,"is_multiple":false,"description":"option description","default":null} diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_option_3.md b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_option_3.md deleted file mode 100644 index 3428289..0000000 --- a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_option_3.md +++ /dev/null @@ -1,9 +0,0 @@ -**option_name:** - -* Name: `--option_name` -* Shortcut: `-o` -* Accept value: yes -* Is value required: yes -* Is multiple: no -* Description: option description -* Default: `NULL` diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_option_3.txt b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_option_3.txt deleted file mode 100644 index b88b12d..0000000 --- a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_option_3.txt +++ /dev/null @@ -1 +0,0 @@ - <info>--option_name</info> (-o) option description diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_option_3.xml b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_option_3.xml deleted file mode 100644 index dcc0631..0000000 --- a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_option_3.xml +++ /dev/null @@ -1,5 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<option name="--option_name" shortcut="-o" accept_value="1" is_value_required="1" is_multiple="0"> - <description>option description</description> - <defaults/> -</option> diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_option_4.json b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_option_4.json deleted file mode 100644 index 1b671d8..0000000 --- a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_option_4.json +++ /dev/null @@ -1 +0,0 @@ -{"name":"--option_name","shortcut":"-o","accept_value":true,"is_value_required":false,"is_multiple":true,"description":"option description","default":[]} diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_option_4.md b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_option_4.md deleted file mode 100644 index 8ffba56..0000000 --- a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_option_4.md +++ /dev/null @@ -1,9 +0,0 @@ -**option_name:** - -* Name: `--option_name` -* Shortcut: `-o` -* Accept value: yes -* Is value required: no -* Is multiple: yes -* Description: option description -* Default: `array ()` diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_option_4.txt b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_option_4.txt deleted file mode 100644 index 5dba5e6..0000000 --- a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_option_4.txt +++ /dev/null @@ -1 +0,0 @@ - <info>--option_name</info> (-o) option description<comment> (multiple values allowed)</comment> diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_option_4.xml b/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_option_4.xml deleted file mode 100644 index 5e2418b..0000000 --- a/vendor/symfony/console/Symfony/Component/Console/Tests/Fixtures/input_option_4.xml +++ /dev/null @@ -1,5 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<option name="--option_name" shortcut="-o" accept_value="1" is_value_required="0" is_multiple="1"> - <description>option description</description> - <defaults/> -</option> diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Formatter/OutputFormatterStyleStackTest.php b/vendor/symfony/console/Symfony/Component/Console/Tests/Formatter/OutputFormatterStyleStackTest.php deleted file mode 100644 index 774df26..0000000 --- a/vendor/symfony/console/Symfony/Component/Console/Tests/Formatter/OutputFormatterStyleStackTest.php +++ /dev/null @@ -1,70 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Tests\Formatter; - -use Symfony\Component\Console\Formatter\OutputFormatterStyleStack; -use Symfony\Component\Console\Formatter\OutputFormatterStyle; - -class OutputFormatterStyleStackTest extends \PHPUnit_Framework_TestCase -{ - public function testPush() - { - $stack = new OutputFormatterStyleStack(); - $stack->push($s1 = new OutputFormatterStyle('white', 'black')); - $stack->push($s2 = new OutputFormatterStyle('yellow', 'blue')); - - $this->assertEquals($s2, $stack->getCurrent()); - - $stack->push($s3 = new OutputFormatterStyle('green', 'red')); - - $this->assertEquals($s3, $stack->getCurrent()); - } - - public function testPop() - { - $stack = new OutputFormatterStyleStack(); - $stack->push($s1 = new OutputFormatterStyle('white', 'black')); - $stack->push($s2 = new OutputFormatterStyle('yellow', 'blue')); - - $this->assertEquals($s2, $stack->pop()); - $this->assertEquals($s1, $stack->pop()); - } - - public function testPopEmpty() - { - $stack = new OutputFormatterStyleStack(); - $style = new OutputFormatterStyle(); - - $this->assertEquals($style, $stack->pop()); - } - - public function testPopNotLast() - { - $stack = new OutputFormatterStyleStack(); - $stack->push($s1 = new OutputFormatterStyle('white', 'black')); - $stack->push($s2 = new OutputFormatterStyle('yellow', 'blue')); - $stack->push($s3 = new OutputFormatterStyle('green', 'red')); - - $this->assertEquals($s2, $stack->pop($s2)); - $this->assertEquals($s1, $stack->pop()); - } - - /** - * @expectedException \InvalidArgumentException - */ - public function testInvalidPop() - { - $stack = new OutputFormatterStyleStack(); - $stack->push(new OutputFormatterStyle('white', 'black')); - $stack->pop(new OutputFormatterStyle('yellow', 'blue')); - } -} diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Formatter/OutputFormatterStyleTest.php b/vendor/symfony/console/Symfony/Component/Console/Tests/Formatter/OutputFormatterStyleTest.php deleted file mode 100644 index 52ada9e..0000000 --- a/vendor/symfony/console/Symfony/Component/Console/Tests/Formatter/OutputFormatterStyleTest.php +++ /dev/null @@ -1,93 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Tests\Formatter; - -use Symfony\Component\Console\Formatter\OutputFormatterStyle; - -class OutputFormatterStyleTest extends \PHPUnit_Framework_TestCase -{ - public function testConstructor() - { - $style = new OutputFormatterStyle('green', 'black', array('bold', 'underscore')); - $this->assertEquals("\033[32;40;1;4mfoo\033[39;49;22;24m", $style->apply('foo')); - - $style = new OutputFormatterStyle('red', null, array('blink')); - $this->assertEquals("\033[31;5mfoo\033[39;25m", $style->apply('foo')); - - $style = new OutputFormatterStyle(null, 'white'); - $this->assertEquals("\033[47mfoo\033[49m", $style->apply('foo')); - } - - public function testForeground() - { - $style = new OutputFormatterStyle(); - - $style->setForeground('black'); - $this->assertEquals("\033[30mfoo\033[39m", $style->apply('foo')); - - $style->setForeground('blue'); - $this->assertEquals("\033[34mfoo\033[39m", $style->apply('foo')); - - $this->setExpectedException('InvalidArgumentException'); - $style->setForeground('undefined-color'); - } - - public function testBackground() - { - $style = new OutputFormatterStyle(); - - $style->setBackground('black'); - $this->assertEquals("\033[40mfoo\033[49m", $style->apply('foo')); - - $style->setBackground('yellow'); - $this->assertEquals("\033[43mfoo\033[49m", $style->apply('foo')); - - $this->setExpectedException('InvalidArgumentException'); - $style->setBackground('undefined-color'); - } - - public function testOptions() - { - $style = new OutputFormatterStyle(); - - $style->setOptions(array('reverse', 'conceal')); - $this->assertEquals("\033[7;8mfoo\033[27;28m", $style->apply('foo')); - - $style->setOption('bold'); - $this->assertEquals("\033[7;8;1mfoo\033[27;28;22m", $style->apply('foo')); - - $style->unsetOption('reverse'); - $this->assertEquals("\033[8;1mfoo\033[28;22m", $style->apply('foo')); - - $style->setOption('bold'); - $this->assertEquals("\033[8;1mfoo\033[28;22m", $style->apply('foo')); - - $style->setOptions(array('bold')); - $this->assertEquals("\033[1mfoo\033[22m", $style->apply('foo')); - - try { - $style->setOption('foo'); - $this->fail('->setOption() throws an \InvalidArgumentException when the option does not exist in the available options'); - } catch (\Exception $e) { - $this->assertInstanceOf('\InvalidArgumentException', $e, '->setOption() throws an \InvalidArgumentException when the option does not exist in the available options'); - $this->assertContains('Invalid option specified: "foo"', $e->getMessage(), '->setOption() throws an \InvalidArgumentException when the option does not exist in the available options'); - } - - try { - $style->unsetOption('foo'); - $this->fail('->unsetOption() throws an \InvalidArgumentException when the option does not exist in the available options'); - } catch (\Exception $e) { - $this->assertInstanceOf('\InvalidArgumentException', $e, '->unsetOption() throws an \InvalidArgumentException when the option does not exist in the available options'); - $this->assertContains('Invalid option specified: "foo"', $e->getMessage(), '->unsetOption() throws an \InvalidArgumentException when the option does not exist in the available options'); - } - } -} diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Formatter/OutputFormatterTest.php b/vendor/symfony/console/Symfony/Component/Console/Tests/Formatter/OutputFormatterTest.php deleted file mode 100644 index 4f4fbbe..0000000 --- a/vendor/symfony/console/Symfony/Component/Console/Tests/Formatter/OutputFormatterTest.php +++ /dev/null @@ -1,257 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Tests\Formatter; - -use Symfony\Component\Console\Formatter\OutputFormatter; -use Symfony\Component\Console\Formatter\OutputFormatterStyle; - -class OutputFormatterTest extends \PHPUnit_Framework_TestCase -{ - public function testEmptyTag() - { - $formatter = new OutputFormatter(true); - $this->assertEquals('foo<>bar', $formatter->format('foo<>bar')); - } - - public function testLGCharEscaping() - { - $formatter = new OutputFormatter(true); - - $this->assertEquals('foo<bar', $formatter->format('foo\\<bar')); - $this->assertEquals('<info>some info</info>', $formatter->format('\\<info>some info\\</info>')); - $this->assertEquals("\\<info>some info\\</info>", OutputFormatter::escape('<info>some info</info>')); - - $this->assertEquals( - "\033[33mSymfony\\Component\\Console does work very well!\033[39m", - $formatter->format('<comment>Symfony\Component\Console does work very well!</comment>') - ); - } - - public function testBundledStyles() - { - $formatter = new OutputFormatter(true); - - $this->assertTrue($formatter->hasStyle('error')); - $this->assertTrue($formatter->hasStyle('info')); - $this->assertTrue($formatter->hasStyle('comment')); - $this->assertTrue($formatter->hasStyle('question')); - - $this->assertEquals( - "\033[37;41msome error\033[39;49m", - $formatter->format('<error>some error</error>') - ); - $this->assertEquals( - "\033[32msome info\033[39m", - $formatter->format('<info>some info</info>') - ); - $this->assertEquals( - "\033[33msome comment\033[39m", - $formatter->format('<comment>some comment</comment>') - ); - $this->assertEquals( - "\033[30;46msome question\033[39;49m", - $formatter->format('<question>some question</question>') - ); - } - - public function testNestedStyles() - { - $formatter = new OutputFormatter(true); - - $this->assertEquals( - "\033[37;41msome \033[39;49m\033[32msome info\033[39m\033[37;41m error\033[39;49m", - $formatter->format('<error>some <info>some info</info> error</error>') - ); - } - - public function testAdjacentStyles() - { - $formatter = new OutputFormatter(true); - - $this->assertEquals( - "\033[37;41msome error\033[39;49m\033[32msome info\033[39m", - $formatter->format('<error>some error</error><info>some info</info>') - ); - } - - public function testStyleMatchingNotGreedy() - { - $formatter = new OutputFormatter(true); - - $this->assertEquals( - "(\033[32m>=2.0,<2.3\033[39m)", - $formatter->format('(<info>>=2.0,<2.3</info>)') - ); - } - - public function testStyleEscaping() - { - $formatter = new OutputFormatter(true); - - $this->assertEquals( - "(\033[32mz>=2.0,<a2.3\033[39m)", - $formatter->format('(<info>'.$formatter->escape('z>=2.0,<a2.3').'</info>)') - ); - - $this->assertEquals( - "\033[32m<error>some error</error>\033[39m", - $formatter->format('<info>'.$formatter->escape('<error>some error</error>').'</info>') - ); - } - - public function testDeepNestedStyles() - { - $formatter = new OutputFormatter(true); - - $this->assertEquals( - "\033[37;41merror\033[39;49m\033[32minfo\033[39m\033[33mcomment\033[39m\033[37;41merror\033[39;49m", - $formatter->format('<error>error<info>info<comment>comment</info>error</error>') - ); - } - - public function testNewStyle() - { - $formatter = new OutputFormatter(true); - - $style = new OutputFormatterStyle('blue', 'white'); - $formatter->setStyle('test', $style); - - $this->assertEquals($style, $formatter->getStyle('test')); - $this->assertNotEquals($style, $formatter->getStyle('info')); - - $style = new OutputFormatterStyle('blue', 'white'); - $formatter->setStyle('b', $style); - - $this->assertEquals("\033[34;47msome \033[39;49m\033[34;47mcustom\033[39;49m\033[34;47m msg\033[39;49m", $formatter->format('<test>some <b>custom</b> msg</test>')); - } - - public function testRedefineStyle() - { - $formatter = new OutputFormatter(true); - - $style = new OutputFormatterStyle('blue', 'white'); - $formatter->setStyle('info', $style); - - $this->assertEquals("\033[34;47msome custom msg\033[39;49m", $formatter->format('<info>some custom msg</info>')); - } - - public function testInlineStyle() - { - $formatter = new OutputFormatter(true); - - $this->assertEquals("\033[34;41msome text\033[39;49m", $formatter->format('<fg=blue;bg=red>some text</>')); - $this->assertEquals("\033[34;41msome text\033[39;49m", $formatter->format('<fg=blue;bg=red>some text</fg=blue;bg=red>')); - } - - public function testNonStyleTag() - { - $formatter = new OutputFormatter(true); - - $this->assertEquals("\033[32msome \033[39m\033[32m<tag>\033[39m\033[32m \033[39m\033[32m<setting=value>\033[39m\033[32m styled \033[39m\033[32m<p>\033[39m\033[32msingle-char tag\033[39m\033[32m</p>\033[39m", $formatter->format('<info>some <tag> <setting=value> styled <p>single-char tag</p></info>')); - } - - public function testFormatLongString() - { - $formatter = new OutputFormatter(true); - $long = str_repeat("\\", 14000); - $this->assertEquals("\033[37;41msome error\033[39;49m".$long, $formatter->format('<error>some error</error>'.$long)); - } - - public function testNotDecoratedFormatter() - { - $formatter = new OutputFormatter(false); - - $this->assertTrue($formatter->hasStyle('error')); - $this->assertTrue($formatter->hasStyle('info')); - $this->assertTrue($formatter->hasStyle('comment')); - $this->assertTrue($formatter->hasStyle('question')); - - $this->assertEquals( - 'some error', $formatter->format('<error>some error</error>') - ); - $this->assertEquals( - 'some info', $formatter->format('<info>some info</info>') - ); - $this->assertEquals( - 'some comment', $formatter->format('<comment>some comment</comment>') - ); - $this->assertEquals( - 'some question', $formatter->format('<question>some question</question>') - ); - - $formatter->setDecorated(true); - - $this->assertEquals( - "\033[37;41msome error\033[39;49m", $formatter->format('<error>some error</error>') - ); - $this->assertEquals( - "\033[32msome info\033[39m", $formatter->format('<info>some info</info>') - ); - $this->assertEquals( - "\033[33msome comment\033[39m", $formatter->format('<comment>some comment</comment>') - ); - $this->assertEquals( - "\033[30;46msome question\033[39;49m", $formatter->format('<question>some question</question>') - ); - } - - public function testContentWithLineBreaks() - { - $formatter = new OutputFormatter(true); - - $this->assertEquals(<<<EOF -\033[32m -some text\033[39m -EOF - , $formatter->format(<<<EOF -<info> -some text</info> -EOF - )); - - $this->assertEquals(<<<EOF -\033[32msome text -\033[39m -EOF - , $formatter->format(<<<EOF -<info>some text -</info> -EOF - )); - - $this->assertEquals(<<<EOF -\033[32m -some text -\033[39m -EOF - , $formatter->format(<<<EOF -<info> -some text -</info> -EOF - )); - - $this->assertEquals(<<<EOF -\033[32m -some text -more text -\033[39m -EOF - , $formatter->format(<<<EOF -<info> -some text -more text -</info> -EOF - )); - } -} diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Helper/FormatterHelperTest.php b/vendor/symfony/console/Symfony/Component/Console/Tests/Helper/FormatterHelperTest.php deleted file mode 100644 index e332774..0000000 --- a/vendor/symfony/console/Symfony/Component/Console/Tests/Helper/FormatterHelperTest.php +++ /dev/null @@ -1,99 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Tests\Helper; - -use Symfony\Component\Console\Helper\FormatterHelper; - -class FormatterHelperTest extends \PHPUnit_Framework_TestCase -{ - public function testFormatSection() - { - $formatter = new FormatterHelper(); - - $this->assertEquals( - '<info>[cli]</info> Some text to display', - $formatter->formatSection('cli', 'Some text to display'), - '::formatSection() formats a message in a section' - ); - } - - public function testFormatBlock() - { - $formatter = new FormatterHelper(); - - $this->assertEquals( - '<error> Some text to display </error>', - $formatter->formatBlock('Some text to display', 'error'), - '::formatBlock() formats a message in a block' - ); - - $this->assertEquals( - '<error> Some text to display </error>'."\n". - '<error> foo bar </error>', - $formatter->formatBlock(array('Some text to display', 'foo bar'), 'error'), - '::formatBlock() formats a message in a block' - ); - - $this->assertEquals( - '<error> </error>'."\n". - '<error> Some text to display </error>'."\n". - '<error> </error>', - $formatter->formatBlock('Some text to display', 'error', true), - '::formatBlock() formats a message in a block' - ); - } - - public function testFormatBlockWithDiacriticLetters() - { - if (!function_exists('mb_detect_encoding')) { - $this->markTestSkipped('This test requires mbstring to work.'); - } - - $formatter = new FormatterHelper(); - - $this->assertEquals( - '<error> </error>'."\n". - '<error> Du texte à afficher </error>'."\n". - '<error> </error>', - $formatter->formatBlock('Du texte à afficher', 'error', true), - '::formatBlock() formats a message in a block' - ); - } - - public function testFormatBlockWithDoubleWidthDiacriticLetters() - { - if (!extension_loaded('mbstring')) { - $this->markTestSkipped('This test requires mbstring to work.'); - } - $formatter = new FormatterHelper(); - $this->assertEquals( - '<error> </error>'."\n". - '<error> 表示するテキスト </error>'."\n". - '<error> </error>', - $formatter->formatBlock('表示するテキスト', 'error', true), - '::formatBlock() formats a message in a block' - ); - } - - public function testFormatBlockLGEscaping() - { - $formatter = new FormatterHelper(); - - $this->assertEquals( - '<error> </error>'."\n". - '<error> \<info>some info\</info> </error>'."\n". - '<error> </error>', - $formatter->formatBlock('<info>some info</info>', 'error', true), - '::formatBlock() escapes \'<\' chars' - ); - } -} diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Helper/HelperSetTest.php b/vendor/symfony/console/Symfony/Component/Console/Tests/Helper/HelperSetTest.php deleted file mode 100644 index bf58a45..0000000 --- a/vendor/symfony/console/Symfony/Component/Console/Tests/Helper/HelperSetTest.php +++ /dev/null @@ -1,153 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Tests\Helper; - -use Symfony\Component\Console\Helper\HelperSet; -use Symfony\Component\Console\Command\Command; - -class HelperSetTest extends \PHPUnit_Framework_TestCase -{ - /** - * @covers \Symfony\Component\Console\Helper\HelperSet::__construct - */ - public function testConstructor() - { - $mock_helper = $this->getGenericMockHelper('fake_helper'); - $helperset = new HelperSet(array('fake_helper_alias' => $mock_helper)); - - $this->assertEquals($mock_helper, $helperset->get('fake_helper_alias'), '__construct sets given helper to helpers'); - $this->assertTrue($helperset->has('fake_helper_alias'), '__construct sets helper alias for given helper'); - } - - /** - * @covers \Symfony\Component\Console\Helper\HelperSet::set - */ - public function testSet() - { - $helperset = new HelperSet(); - $helperset->set($this->getGenericMockHelper('fake_helper', $helperset)); - $this->assertTrue($helperset->has('fake_helper'), '->set() adds helper to helpers'); - - $helperset = new HelperSet(); - $helperset->set($this->getGenericMockHelper('fake_helper_01', $helperset)); - $helperset->set($this->getGenericMockHelper('fake_helper_02', $helperset)); - $this->assertTrue($helperset->has('fake_helper_01'), '->set() will set multiple helpers on consecutive calls'); - $this->assertTrue($helperset->has('fake_helper_02'), '->set() will set multiple helpers on consecutive calls'); - - $helperset = new HelperSet(); - $helperset->set($this->getGenericMockHelper('fake_helper', $helperset), 'fake_helper_alias'); - $this->assertTrue($helperset->has('fake_helper'), '->set() adds helper alias when set'); - $this->assertTrue($helperset->has('fake_helper_alias'), '->set() adds helper alias when set'); - } - - /** - * @covers \Symfony\Component\Console\Helper\HelperSet::has - */ - public function testHas() - { - $helperset = new HelperSet(array('fake_helper_alias' => $this->getGenericMockHelper('fake_helper'))); - $this->assertTrue($helperset->has('fake_helper'), '->has() finds set helper'); - $this->assertTrue($helperset->has('fake_helper_alias'), '->has() finds set helper by alias'); - } - - /** - * @covers \Symfony\Component\Console\Helper\HelperSet::get - */ - public function testGet() - { - $helper_01 = $this->getGenericMockHelper('fake_helper_01'); - $helper_02 = $this->getGenericMockHelper('fake_helper_02'); - $helperset = new HelperSet(array('fake_helper_01_alias' => $helper_01, 'fake_helper_02_alias' => $helper_02)); - $this->assertEquals($helper_01, $helperset->get('fake_helper_01'), '->get() returns correct helper by name'); - $this->assertEquals($helper_01, $helperset->get('fake_helper_01_alias'), '->get() returns correct helper by alias'); - $this->assertEquals($helper_02, $helperset->get('fake_helper_02'), '->get() returns correct helper by name'); - $this->assertEquals($helper_02, $helperset->get('fake_helper_02_alias'), '->get() returns correct helper by alias'); - - $helperset = new HelperSet(); - try { - $helperset->get('foo'); - $this->fail('->get() throws \InvalidArgumentException when helper not found'); - } catch (\Exception $e) { - $this->assertInstanceOf('\InvalidArgumentException', $e, '->get() throws \InvalidArgumentException when helper not found'); - $this->assertContains('The helper "foo" is not defined.', $e->getMessage(), '->get() throws \InvalidArgumentException when helper not found'); - } - } - - /** - * @covers \Symfony\Component\Console\Helper\HelperSet::setCommand - */ - public function testSetCommand() - { - $cmd_01 = new Command('foo'); - $cmd_02 = new Command('bar'); - - $helperset = new HelperSet(); - $helperset->setCommand($cmd_01); - $this->assertEquals($cmd_01, $helperset->getCommand(), '->setCommand() stores given command'); - - $helperset = new HelperSet(); - $helperset->setCommand($cmd_01); - $helperset->setCommand($cmd_02); - $this->assertEquals($cmd_02, $helperset->getCommand(), '->setCommand() overwrites stored command with consecutive calls'); - } - - /** - * @covers \Symfony\Component\Console\Helper\HelperSet::getCommand - */ - public function testGetCommand() - { - $cmd = new Command('foo'); - $helperset = new HelperSet(); - $helperset->setCommand($cmd); - $this->assertEquals($cmd, $helperset->getCommand(), '->getCommand() retrieves stored command'); - } - - /** - * @covers \Symfony\Component\Console\Helper\HelperSet::getIterator - */ - public function testIteration() - { - $helperset = new HelperSet(); - $helperset->set($this->getGenericMockHelper('fake_helper_01', $helperset)); - $helperset->set($this->getGenericMockHelper('fake_helper_02', $helperset)); - - $helpers = array('fake_helper_01', 'fake_helper_02'); - $i = 0; - - foreach ($helperset as $helper) { - $this->assertEquals($helpers[$i++], $helper->getName()); - } - } - - /** - * Create a generic mock for the helper interface. Optionally check for a call to setHelperSet with a specific - * helperset instance. - * - * @param string $name - * @param HelperSet $helperset allows a mock to verify a particular helperset set is being added to the Helper - */ - private function getGenericMockHelper($name, HelperSet $helperset = null) - { - $mock_helper = $this->getMock('\Symfony\Component\Console\Helper\HelperInterface'); - $mock_helper->expects($this->any()) - ->method('getName') - ->will($this->returnValue($name)); - - if ($helperset) { - $mock_helper->expects($this->any()) - ->method('setHelperSet') - ->with($this->equalTo($helperset)); - } - - return $mock_helper; - } -} diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Helper/LegacyDialogHelperTest.php b/vendor/symfony/console/Symfony/Component/Console/Tests/Helper/LegacyDialogHelperTest.php deleted file mode 100644 index cf07793..0000000 --- a/vendor/symfony/console/Symfony/Component/Console/Tests/Helper/LegacyDialogHelperTest.php +++ /dev/null @@ -1,200 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Tests\Helper; - -use Symfony\Component\Console\Input\ArrayInput; -use Symfony\Component\Console\Helper\DialogHelper; -use Symfony\Component\Console\Helper\HelperSet; -use Symfony\Component\Console\Helper\FormatterHelper; -use Symfony\Component\Console\Output\StreamOutput; - -/** - * @group legacy - */ -class LegacyDialogHelperTest extends \PHPUnit_Framework_TestCase -{ - protected function setUp() - { - $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED); - } - - public function testSelect() - { - $dialog = new DialogHelper(); - - $helperSet = new HelperSet(array(new FormatterHelper())); - $dialog->setHelperSet($helperSet); - - $heroes = array('Superman', 'Batman', 'Spiderman'); - - $dialog->setInputStream($this->getInputStream("\n1\n 1 \nFabien\n1\nFabien\n1\n0,2\n 0 , 2 \n\n\n")); - $this->assertEquals('2', $dialog->select($this->getOutputStream(), 'What is your favorite superhero?', $heroes, '2')); - $this->assertEquals('1', $dialog->select($this->getOutputStream(), 'What is your favorite superhero?', $heroes)); - $this->assertEquals('1', $dialog->select($this->getOutputStream(), 'What is your favorite superhero?', $heroes)); - $this->assertEquals('1', $dialog->select($output = $this->getOutputStream(), 'What is your favorite superhero?', $heroes, null, false, 'Input "%s" is not a superhero!', false)); - - rewind($output->getStream()); - $this->assertContains('Input "Fabien" is not a superhero!', stream_get_contents($output->getStream())); - - try { - $this->assertEquals('1', $dialog->select($output = $this->getOutputStream(), 'What is your favorite superhero?', $heroes, null, 1)); - $this->fail(); - } catch (\InvalidArgumentException $e) { - $this->assertEquals('Value "Fabien" is invalid', $e->getMessage()); - } - - $this->assertEquals(array('1'), $dialog->select($this->getOutputStream(), 'What is your favorite superhero?', $heroes, null, false, 'Input "%s" is not a superhero!', true)); - $this->assertEquals(array('0', '2'), $dialog->select($this->getOutputStream(), 'What is your favorite superhero?', $heroes, null, false, 'Input "%s" is not a superhero!', true)); - $this->assertEquals(array('0', '2'), $dialog->select($this->getOutputStream(), 'What is your favorite superhero?', $heroes, null, false, 'Input "%s" is not a superhero!', true)); - $this->assertEquals(array('0', '1'), $dialog->select($this->getOutputStream(), 'What is your favorite superhero?', $heroes, '0,1', false, 'Input "%s" is not a superhero!', true)); - $this->assertEquals(array('0', '1'), $dialog->select($this->getOutputStream(), 'What is your favorite superhero?', $heroes, ' 0 , 1 ', false, 'Input "%s" is not a superhero!', true)); - } - - public function testAsk() - { - $dialog = new DialogHelper(); - - $dialog->setInputStream($this->getInputStream("\n8AM\n")); - - $this->assertEquals('2PM', $dialog->ask($this->getOutputStream(), 'What time is it?', '2PM')); - $this->assertEquals('8AM', $dialog->ask($output = $this->getOutputStream(), 'What time is it?', '2PM')); - - rewind($output->getStream()); - $this->assertEquals('What time is it?', stream_get_contents($output->getStream())); - } - - public function testAskWithAutocomplete() - { - if (!$this->hasSttyAvailable()) { - $this->markTestSkipped('`stty` is required to test autocomplete functionality'); - } - - // Acm<NEWLINE> - // Ac<BACKSPACE><BACKSPACE>s<TAB>Test<NEWLINE> - // <NEWLINE> - // <UP ARROW><UP ARROW><NEWLINE> - // <UP ARROW><UP ARROW><UP ARROW><UP ARROW><UP ARROW><TAB>Test<NEWLINE> - // <DOWN ARROW><NEWLINE> - // S<BACKSPACE><BACKSPACE><DOWN ARROW><DOWN ARROW><NEWLINE> - // F00<BACKSPACE><BACKSPACE>oo<TAB><NEWLINE> - $inputStream = $this->getInputStream("Acm\nAc\177\177s\tTest\n\n\033[A\033[A\n\033[A\033[A\033[A\033[A\033[A\tTest\n\033[B\nS\177\177\033[B\033[B\nF00\177\177oo\t\n"); - - $dialog = new DialogHelper(); - $dialog->setInputStream($inputStream); - - $bundles = array('AcmeDemoBundle', 'AsseticBundle', 'SecurityBundle', 'FooBundle'); - - $this->assertEquals('AcmeDemoBundle', $dialog->ask($this->getOutputStream(), 'Please select a bundle', 'FrameworkBundle', $bundles)); - $this->assertEquals('AsseticBundleTest', $dialog->ask($this->getOutputStream(), 'Please select a bundle', 'FrameworkBundle', $bundles)); - $this->assertEquals('FrameworkBundle', $dialog->ask($this->getOutputStream(), 'Please select a bundle', 'FrameworkBundle', $bundles)); - $this->assertEquals('SecurityBundle', $dialog->ask($this->getOutputStream(), 'Please select a bundle', 'FrameworkBundle', $bundles)); - $this->assertEquals('FooBundleTest', $dialog->ask($this->getOutputStream(), 'Please select a bundle', 'FrameworkBundle', $bundles)); - $this->assertEquals('AcmeDemoBundle', $dialog->ask($this->getOutputStream(), 'Please select a bundle', 'FrameworkBundle', $bundles)); - $this->assertEquals('AsseticBundle', $dialog->ask($this->getOutputStream(), 'Please select a bundle', 'FrameworkBundle', $bundles)); - $this->assertEquals('FooBundle', $dialog->ask($this->getOutputStream(), 'Please select a bundle', 'FrameworkBundle', $bundles)); - } - - /** - * @group tty - */ - public function testAskHiddenResponse() - { - if ('\\' === DIRECTORY_SEPARATOR) { - $this->markTestSkipped('This test is not supported on Windows'); - } - - $dialog = new DialogHelper(); - - $dialog->setInputStream($this->getInputStream("8AM\n")); - - $this->assertEquals('8AM', $dialog->askHiddenResponse($this->getOutputStream(), 'What time is it?')); - } - - public function testAskConfirmation() - { - $dialog = new DialogHelper(); - - $dialog->setInputStream($this->getInputStream("\n\n")); - $this->assertTrue($dialog->askConfirmation($this->getOutputStream(), 'Do you like French fries?')); - $this->assertFalse($dialog->askConfirmation($this->getOutputStream(), 'Do you like French fries?', false)); - - $dialog->setInputStream($this->getInputStream("y\nyes\n")); - $this->assertTrue($dialog->askConfirmation($this->getOutputStream(), 'Do you like French fries?', false)); - $this->assertTrue($dialog->askConfirmation($this->getOutputStream(), 'Do you like French fries?', false)); - - $dialog->setInputStream($this->getInputStream("n\nno\n")); - $this->assertFalse($dialog->askConfirmation($this->getOutputStream(), 'Do you like French fries?', true)); - $this->assertFalse($dialog->askConfirmation($this->getOutputStream(), 'Do you like French fries?', true)); - } - - public function testAskAndValidate() - { - $dialog = new DialogHelper(); - $helperSet = new HelperSet(array(new FormatterHelper())); - $dialog->setHelperSet($helperSet); - - $question = 'What color was the white horse of Henry IV?'; - $error = 'This is not a color!'; - $validator = function ($color) use ($error) { - if (!in_array($color, array('white', 'black'))) { - throw new \InvalidArgumentException($error); - } - - return $color; - }; - - $dialog->setInputStream($this->getInputStream("\nblack\n")); - $this->assertEquals('white', $dialog->askAndValidate($this->getOutputStream(), $question, $validator, 2, 'white')); - $this->assertEquals('black', $dialog->askAndValidate($this->getOutputStream(), $question, $validator, 2, 'white')); - - $dialog->setInputStream($this->getInputStream("green\nyellow\norange\n")); - try { - $this->assertEquals('white', $dialog->askAndValidate($this->getOutputStream(), $question, $validator, 2, 'white')); - $this->fail(); - } catch (\InvalidArgumentException $e) { - $this->assertEquals($error, $e->getMessage()); - } - } - - public function testNoInteraction() - { - $dialog = new DialogHelper(); - - $input = new ArrayInput(array()); - $input->setInteractive(false); - - $dialog->setInput($input); - - $this->assertEquals('not yet', $dialog->ask($this->getOutputStream(), 'Do you have a job?', 'not yet')); - } - - protected function getInputStream($input) - { - $stream = fopen('php://memory', 'r+', false); - fwrite($stream, $input); - rewind($stream); - - return $stream; - } - - protected function getOutputStream() - { - return new StreamOutput(fopen('php://memory', 'r+', false)); - } - - private function hasSttyAvailable() - { - exec('stty 2>&1', $output, $exitcode); - - return $exitcode === 0; - } -} diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Helper/LegacyProgressHelperTest.php b/vendor/symfony/console/Symfony/Component/Console/Tests/Helper/LegacyProgressHelperTest.php deleted file mode 100644 index e93057a..0000000 --- a/vendor/symfony/console/Symfony/Component/Console/Tests/Helper/LegacyProgressHelperTest.php +++ /dev/null @@ -1,232 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Tests\Helper; - -use Symfony\Component\Console\Helper\ProgressHelper; -use Symfony\Component\Console\Output\StreamOutput; - -/** - * @group legacy - */ -class LegacyProgressHelperTest extends \PHPUnit_Framework_TestCase -{ - protected function setUp() - { - $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED); - } - - public function testAdvance() - { - $progress = new ProgressHelper(); - $progress->start($output = $this->getOutputStream()); - $progress->advance(); - - rewind($output->getStream()); - $this->assertEquals($this->generateOutput(' 1 [->--------------------------]'), stream_get_contents($output->getStream())); - } - - public function testAdvanceWithStep() - { - $progress = new ProgressHelper(); - $progress->start($output = $this->getOutputStream()); - $progress->advance(5); - - rewind($output->getStream()); - $this->assertEquals($this->generateOutput(' 5 [----->----------------------]'), stream_get_contents($output->getStream())); - } - - public function testAdvanceMultipleTimes() - { - $progress = new ProgressHelper(); - $progress->start($output = $this->getOutputStream()); - $progress->advance(3); - $progress->advance(2); - - rewind($output->getStream()); - $this->assertEquals($this->generateOutput(' 3 [--->------------------------]').$this->generateOutput(' 5 [----->----------------------]'), stream_get_contents($output->getStream())); - } - - public function testCustomizations() - { - $progress = new ProgressHelper(); - $progress->setBarWidth(10); - $progress->setBarCharacter('_'); - $progress->setEmptyBarCharacter(' '); - $progress->setProgressCharacter('/'); - $progress->setFormat(' %current%/%max% [%bar%] %percent%%'); - $progress->start($output = $this->getOutputStream(), 10); - $progress->advance(); - - rewind($output->getStream()); - $this->assertEquals($this->generateOutput(' 1/10 [_/ ] 10%'), stream_get_contents($output->getStream())); - } - - public function testPercent() - { - $progress = new ProgressHelper(); - $progress->start($output = $this->getOutputStream(), 50); - $progress->display(); - $progress->advance(); - $progress->advance(); - - rewind($output->getStream()); - $this->assertEquals($this->generateOutput(' 0/50 [>---------------------------] 0%').$this->generateOutput(' 1/50 [>---------------------------] 2%').$this->generateOutput(' 2/50 [=>--------------------------] 4%'), stream_get_contents($output->getStream())); - } - - public function testOverwriteWithShorterLine() - { - $progress = new ProgressHelper(); - $progress->setFormat(' %current%/%max% [%bar%] %percent%%'); - $progress->start($output = $this->getOutputStream(), 50); - $progress->display(); - $progress->advance(); - - // set shorter format - $progress->setFormat(' %current%/%max% [%bar%]'); - $progress->advance(); - - rewind($output->getStream()); - $this->assertEquals( - $this->generateOutput(' 0/50 [>---------------------------] 0%'). - $this->generateOutput(' 1/50 [>---------------------------] 2%'). - $this->generateOutput(' 2/50 [=>--------------------------] '), - stream_get_contents($output->getStream()) - ); - } - - public function testSetCurrentProgress() - { - $progress = new ProgressHelper(); - $progress->start($output = $this->getOutputStream(), 50); - $progress->display(); - $progress->advance(); - $progress->setCurrent(15); - $progress->setCurrent(25); - - rewind($output->getStream()); - $this->assertEquals( - $this->generateOutput(' 0/50 [>---------------------------] 0%'). - $this->generateOutput(' 1/50 [>---------------------------] 2%'). - $this->generateOutput(' 15/50 [========>-------------------] 30%'). - $this->generateOutput(' 25/50 [==============>-------------] 50%'), - stream_get_contents($output->getStream()) - ); - } - - /** - * @expectedException \LogicException - * @expectedExceptionMessage You must start the progress bar - */ - public function testSetCurrentBeforeStarting() - { - $progress = new ProgressHelper(); - $progress->setCurrent(15); - } - - /** - * @expectedException \LogicException - * @expectedExceptionMessage You can't regress the progress bar - */ - public function testRegressProgress() - { - $progress = new ProgressHelper(); - $progress->start($output = $this->getOutputStream(), 50); - $progress->setCurrent(15); - $progress->setCurrent(10); - } - - public function testRedrawFrequency() - { - $progress = $this->getMock('Symfony\Component\Console\Helper\ProgressHelper', array('display')); - $progress->expects($this->exactly(4)) - ->method('display'); - - $progress->setRedrawFrequency(2); - - $progress->start($output = $this->getOutputStream(), 6); - $progress->setCurrent(1); - $progress->advance(2); - $progress->advance(2); - $progress->advance(1); - } - - public function testMultiByteSupport() - { - if (!function_exists('mb_strlen') || (false === $encoding = mb_detect_encoding('■'))) { - $this->markTestSkipped('The mbstring extension is needed for multi-byte support'); - } - - $progress = new ProgressHelper(); - $progress->start($output = $this->getOutputStream()); - $progress->setBarCharacter('■'); - $progress->advance(3); - - rewind($output->getStream()); - $this->assertEquals($this->generateOutput(' 3 [■■■>------------------------]'), stream_get_contents($output->getStream())); - } - - public function testClear() - { - $progress = new ProgressHelper(); - $progress->start($output = $this->getOutputStream(), 50); - $progress->setCurrent(25); - $progress->clear(); - - rewind($output->getStream()); - $this->assertEquals( - $this->generateOutput(' 25/50 [==============>-------------] 50%').$this->generateOutput(''), - stream_get_contents($output->getStream()) - ); - } - - public function testPercentNotHundredBeforeComplete() - { - $progress = new ProgressHelper(); - $progress->start($output = $this->getOutputStream(), 200); - $progress->display(); - $progress->advance(199); - $progress->advance(); - - rewind($output->getStream()); - $this->assertEquals($this->generateOutput(' 0/200 [>---------------------------] 0%').$this->generateOutput(' 199/200 [===========================>] 99%').$this->generateOutput(' 200/200 [============================] 100%'), stream_get_contents($output->getStream())); - } - - public function testNonDecoratedOutput() - { - $progress = new ProgressHelper(); - $progress->start($output = $this->getOutputStream(false)); - $progress->advance(); - - rewind($output->getStream()); - $this->assertEquals('', stream_get_contents($output->getStream())); - } - - protected function getOutputStream($decorated = true) - { - return new StreamOutput(fopen('php://memory', 'r+', false), StreamOutput::VERBOSITY_NORMAL, $decorated); - } - - protected $lastMessagesLength; - - protected function generateOutput($expected) - { - $expectedout = $expected; - - if ($this->lastMessagesLength !== null) { - $expectedout = str_pad($expected, $this->lastMessagesLength, "\x20", STR_PAD_RIGHT); - } - - $this->lastMessagesLength = strlen($expectedout); - - return "\x0D".$expectedout; - } -} diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Helper/LegacyTableHelperTest.php b/vendor/symfony/console/Symfony/Component/Console/Tests/Helper/LegacyTableHelperTest.php deleted file mode 100644 index b7e3159..0000000 --- a/vendor/symfony/console/Symfony/Component/Console/Tests/Helper/LegacyTableHelperTest.php +++ /dev/null @@ -1,325 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Tests\Helper; - -use Symfony\Component\Console\Helper\TableHelper; -use Symfony\Component\Console\Output\StreamOutput; - -/** - * @group legacy - */ -class LegacyTableHelperTest extends \PHPUnit_Framework_TestCase -{ - protected $stream; - - protected function setUp() - { - $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED); - $this->stream = fopen('php://memory', 'r+'); - } - - protected function tearDown() - { - fclose($this->stream); - $this->stream = null; - } - - /** - * @dataProvider testRenderProvider - */ - public function testRender($headers, $rows, $layout, $expected) - { - $table = new TableHelper(); - $table - ->setHeaders($headers) - ->setRows($rows) - ->setLayout($layout) - ; - $table->render($output = $this->getOutputStream()); - - $this->assertEquals($expected, $this->getOutputContent($output)); - } - - /** - * @dataProvider testRenderProvider - */ - public function testRenderAddRows($headers, $rows, $layout, $expected) - { - $table = new TableHelper(); - $table - ->setHeaders($headers) - ->addRows($rows) - ->setLayout($layout) - ; - $table->render($output = $this->getOutputStream()); - - $this->assertEquals($expected, $this->getOutputContent($output)); - } - - /** - * @dataProvider testRenderProvider - */ - public function testRenderAddRowsOneByOne($headers, $rows, $layout, $expected) - { - $table = new TableHelper(); - $table - ->setHeaders($headers) - ->setLayout($layout) - ; - foreach ($rows as $row) { - $table->addRow($row); - } - $table->render($output = $this->getOutputStream()); - - $this->assertEquals($expected, $this->getOutputContent($output)); - } - - public function testRenderProvider() - { - $books = array( - array('99921-58-10-7', 'Divine Comedy', 'Dante Alighieri'), - array('9971-5-0210-0', 'A Tale of Two Cities', 'Charles Dickens'), - array('960-425-059-0', 'The Lord of the Rings', 'J. R. R. Tolkien'), - array('80-902734-1-6', 'And Then There Were None', 'Agatha Christie'), - ); - - return array( - array( - array('ISBN', 'Title', 'Author'), - $books, - TableHelper::LAYOUT_DEFAULT, -<<<TABLE -+---------------+--------------------------+------------------+ -| ISBN | Title | Author | -+---------------+--------------------------+------------------+ -| 99921-58-10-7 | Divine Comedy | Dante Alighieri | -| 9971-5-0210-0 | A Tale of Two Cities | Charles Dickens | -| 960-425-059-0 | The Lord of the Rings | J. R. R. Tolkien | -| 80-902734-1-6 | And Then There Were None | Agatha Christie | -+---------------+--------------------------+------------------+ - -TABLE - ), - array( - array('ISBN', 'Title', 'Author'), - $books, - TableHelper::LAYOUT_COMPACT, -<<<TABLE - ISBN Title Author - 99921-58-10-7 Divine Comedy Dante Alighieri - 9971-5-0210-0 A Tale of Two Cities Charles Dickens - 960-425-059-0 The Lord of the Rings J. R. R. Tolkien - 80-902734-1-6 And Then There Were None Agatha Christie - -TABLE - ), - array( - array('ISBN', 'Title', 'Author'), - $books, - TableHelper::LAYOUT_BORDERLESS, -<<<TABLE - =============== ========================== ================== - ISBN Title Author - =============== ========================== ================== - 99921-58-10-7 Divine Comedy Dante Alighieri - 9971-5-0210-0 A Tale of Two Cities Charles Dickens - 960-425-059-0 The Lord of the Rings J. R. R. Tolkien - 80-902734-1-6 And Then There Were None Agatha Christie - =============== ========================== ================== - -TABLE - ), - array( - array('ISBN', 'Title'), - array( - array('99921-58-10-7', 'Divine Comedy', 'Dante Alighieri'), - array('9971-5-0210-0'), - array('960-425-059-0', 'The Lord of the Rings', 'J. R. R. Tolkien'), - array('80-902734-1-6', 'And Then There Were None', 'Agatha Christie'), - ), - TableHelper::LAYOUT_DEFAULT, -<<<TABLE -+---------------+--------------------------+------------------+ -| ISBN | Title | | -+---------------+--------------------------+------------------+ -| 99921-58-10-7 | Divine Comedy | Dante Alighieri | -| 9971-5-0210-0 | | | -| 960-425-059-0 | The Lord of the Rings | J. R. R. Tolkien | -| 80-902734-1-6 | And Then There Were None | Agatha Christie | -+---------------+--------------------------+------------------+ - -TABLE - ), - array( - array(), - array( - array('99921-58-10-7', 'Divine Comedy', 'Dante Alighieri'), - array('9971-5-0210-0'), - array('960-425-059-0', 'The Lord of the Rings', 'J. R. R. Tolkien'), - array('80-902734-1-6', 'And Then There Were None', 'Agatha Christie'), - ), - TableHelper::LAYOUT_DEFAULT, -<<<TABLE -+---------------+--------------------------+------------------+ -| 99921-58-10-7 | Divine Comedy | Dante Alighieri | -| 9971-5-0210-0 | | | -| 960-425-059-0 | The Lord of the Rings | J. R. R. Tolkien | -| 80-902734-1-6 | And Then There Were None | Agatha Christie | -+---------------+--------------------------+------------------+ - -TABLE - ), - array( - array('ISBN', 'Title', 'Author'), - array( - array('99921-58-10-7', "Divine\nComedy", 'Dante Alighieri'), - array('9971-5-0210-2', "Harry Potter\nand the Chamber of Secrets", "Rowling\nJoanne K."), - array('9971-5-0210-2', "Harry Potter\nand the Chamber of Secrets", "Rowling\nJoanne K."), - array('960-425-059-0', 'The Lord of the Rings', "J. R. R.\nTolkien"), - ), - TableHelper::LAYOUT_DEFAULT, -<<<TABLE -+---------------+----------------------------+-----------------+ -| ISBN | Title | Author | -+---------------+----------------------------+-----------------+ -| 99921-58-10-7 | Divine | Dante Alighieri | -| | Comedy | | -| 9971-5-0210-2 | Harry Potter | Rowling | -| | and the Chamber of Secrets | Joanne K. | -| 9971-5-0210-2 | Harry Potter | Rowling | -| | and the Chamber of Secrets | Joanne K. | -| 960-425-059-0 | The Lord of the Rings | J. R. R. | -| | | Tolkien | -+---------------+----------------------------+-----------------+ - -TABLE - ), - array( - array('ISBN', 'Title'), - array(), - TableHelper::LAYOUT_DEFAULT, -<<<TABLE -+------+-------+ -| ISBN | Title | -+------+-------+ - -TABLE - ), - array( - array(), - array(), - TableHelper::LAYOUT_DEFAULT, - '', - ), - 'Cell text with tags used for Output styling' => array( - array('ISBN', 'Title', 'Author'), - array( - array('<info>99921-58-10-7</info>', '<error>Divine Comedy</error>', '<fg=blue;bg=white>Dante Alighieri</fg=blue;bg=white>'), - array('9971-5-0210-0', 'A Tale of Two Cities', '<info>Charles Dickens</>'), - ), - TableHelper::LAYOUT_DEFAULT, -<<<TABLE -+---------------+----------------------+-----------------+ -| ISBN | Title | Author | -+---------------+----------------------+-----------------+ -| 99921-58-10-7 | Divine Comedy | Dante Alighieri | -| 9971-5-0210-0 | A Tale of Two Cities | Charles Dickens | -+---------------+----------------------+-----------------+ - -TABLE - ), - 'Cell text with tags not used for Output styling' => array( - array('ISBN', 'Title', 'Author'), - array( - array('<strong>99921-58-10-700</strong>', '<f>Divine Com</f>', 'Dante Alighieri'), - array('9971-5-0210-0', 'A Tale of Two Cities', 'Charles Dickens'), - ), - TableHelper::LAYOUT_DEFAULT, -<<<TABLE -+----------------------------------+----------------------+-----------------+ -| ISBN | Title | Author | -+----------------------------------+----------------------+-----------------+ -| <strong>99921-58-10-700</strong> | <f>Divine Com</f> | Dante Alighieri | -| 9971-5-0210-0 | A Tale of Two Cities | Charles Dickens | -+----------------------------------+----------------------+-----------------+ - -TABLE - ), - ); - } - - public function testRenderMultiByte() - { - if (!function_exists('mb_strwidth')) { - $this->markTestSkipped('The "mbstring" extension is not available'); - } - - $table = new TableHelper(); - $table - ->setHeaders(array('■■')) - ->setRows(array(array(1234))) - ->setLayout(TableHelper::LAYOUT_DEFAULT) - ; - $table->render($output = $this->getOutputStream()); - - $expected = -<<<TABLE -+------+ -| ■■ | -+------+ -| 1234 | -+------+ - -TABLE; - - $this->assertEquals($expected, $this->getOutputContent($output)); - } - - public function testRenderFullWidthCharacters() - { - if (!function_exists('mb_strwidth')) { - $this->markTestSkipped('The "mbstring" extension is not available'); - } - - $table = new TableHelper(); - $table - ->setHeaders(array('あいうえお')) - ->setRows(array(array(1234567890))) - ->setLayout(TableHelper::LAYOUT_DEFAULT) - ; - $table->render($output = $this->getOutputStream()); - - $expected = - <<<TABLE -+------------+ -| あいうえお | -+------------+ -| 1234567890 | -+------------+ - -TABLE; - - $this->assertEquals($expected, $this->getOutputContent($output)); - } - - protected function getOutputStream() - { - return new StreamOutput($this->stream, StreamOutput::VERBOSITY_NORMAL, false); - } - - protected function getOutputContent(StreamOutput $output) - { - rewind($output->getStream()); - - return str_replace(PHP_EOL, "\n", stream_get_contents($output->getStream())); - } -} diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Helper/ProcessHelperTest.php b/vendor/symfony/console/Symfony/Component/Console/Tests/Helper/ProcessHelperTest.php deleted file mode 100644 index 2e333dc..0000000 --- a/vendor/symfony/console/Symfony/Component/Console/Tests/Helper/ProcessHelperTest.php +++ /dev/null @@ -1,118 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Tests\Helper; - -use Symfony\Component\Console\Helper\DebugFormatterHelper; -use Symfony\Component\Console\Helper\HelperSet; -use Symfony\Component\Console\Helper\Helper; -use Symfony\Component\Console\Output\StreamOutput; -use Symfony\Component\Console\Helper\ProcessHelper; -use Symfony\Component\Process\Process; - -class ProcessHelperTest extends \PHPUnit_Framework_TestCase -{ - /** - * @dataProvider provideCommandsAndOutput - */ - public function testVariousProcessRuns($expected, $cmd, $verbosity, $error) - { - $helper = new ProcessHelper(); - $helper->setHelperSet(new HelperSet(array(new DebugFormatterHelper()))); - $output = $this->getOutputStream($verbosity); - $helper->run($output, $cmd, $error); - $this->assertEquals($expected, $this->getOutput($output)); - } - - public function testPassedCallbackIsExecuted() - { - $helper = new ProcessHelper(); - $helper->setHelperSet(new HelperSet(array(new DebugFormatterHelper()))); - $output = $this->getOutputStream(StreamOutput::VERBOSITY_NORMAL); - - $executed = false; - $callback = function () use (&$executed) { $executed = true; }; - - $helper->run($output, 'php -r "echo 42;"', null, $callback); - $this->assertTrue($executed); - } - - public function provideCommandsAndOutput() - { - $successOutputVerbose = <<<EOT - RUN php -r "echo 42;" - RES Command ran successfully - -EOT; - $successOutputDebug = <<<EOT - RUN php -r "echo 42;" - OUT 42 - RES Command ran successfully - -EOT; - $successOutputDebugWithTags = <<<EOT - RUN php -r "echo \"<info>42</info>\";" - OUT <info>42</info> - RES Command ran successfully - -EOT; - $successOutputProcessDebug = <<<EOT - RUN 'php' '-r' 'echo 42;' - OUT 42 - RES Command ran successfully - -EOT; - $syntaxErrorOutputVerbose = <<<EOT - RUN php -r "fwrite(STDERR, 'error message');usleep(50000);fwrite(STDOUT, 'out message');exit(252);" - RES 252 Command did not run successfully - -EOT; - $syntaxErrorOutputDebug = <<<EOT - RUN php -r "fwrite(STDERR, 'error message');usleep(50000);fwrite(STDOUT, 'out message');exit(252);" - ERR error message - OUT out message - RES 252 Command did not run successfully - -EOT; - - $errorMessage = 'An error occurred'; - if ('\\' === DIRECTORY_SEPARATOR) { - $successOutputProcessDebug = str_replace("'", '"', $successOutputProcessDebug); - } - - return array( - array('', 'php -r "echo 42;"', StreamOutput::VERBOSITY_VERBOSE, null), - array($successOutputVerbose, 'php -r "echo 42;"', StreamOutput::VERBOSITY_VERY_VERBOSE, null), - array($successOutputDebug, 'php -r "echo 42;"', StreamOutput::VERBOSITY_DEBUG, null), - array($successOutputDebugWithTags, 'php -r "echo \"<info>42</info>\";"', StreamOutput::VERBOSITY_DEBUG, null), - array('', 'php -r "syntax error"', StreamOutput::VERBOSITY_VERBOSE, null), - array($syntaxErrorOutputVerbose, 'php -r "fwrite(STDERR, \'error message\');usleep(50000);fwrite(STDOUT, \'out message\');exit(252);"', StreamOutput::VERBOSITY_VERY_VERBOSE, null), - array($syntaxErrorOutputDebug, 'php -r "fwrite(STDERR, \'error message\');usleep(50000);fwrite(STDOUT, \'out message\');exit(252);"', StreamOutput::VERBOSITY_DEBUG, null), - array($errorMessage.PHP_EOL, 'php -r "fwrite(STDERR, \'error message\');usleep(50000);fwrite(STDOUT, \'out message\');exit(252);"', StreamOutput::VERBOSITY_VERBOSE, $errorMessage), - array($syntaxErrorOutputVerbose.$errorMessage.PHP_EOL, 'php -r "fwrite(STDERR, \'error message\');usleep(50000);fwrite(STDOUT, \'out message\');exit(252);"', StreamOutput::VERBOSITY_VERY_VERBOSE, $errorMessage), - array($syntaxErrorOutputDebug.$errorMessage.PHP_EOL, 'php -r "fwrite(STDERR, \'error message\');usleep(50000);fwrite(STDOUT, \'out message\');exit(252);"', StreamOutput::VERBOSITY_DEBUG, $errorMessage), - array($successOutputProcessDebug, array('php', '-r', 'echo 42;'), StreamOutput::VERBOSITY_DEBUG, null), - array($successOutputDebug, new Process('php -r "echo 42;"'), StreamOutput::VERBOSITY_DEBUG, null), - ); - } - - private function getOutputStream($verbosity) - { - return new StreamOutput(fopen('php://memory', 'r+', false), $verbosity, false); - } - - private function getOutput(StreamOutput $output) - { - rewind($output->getStream()); - - return stream_get_contents($output->getStream()); - } -} diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Helper/ProgressBarTest.php b/vendor/symfony/console/Symfony/Component/Console/Tests/Helper/ProgressBarTest.php deleted file mode 100644 index 59c06bb..0000000 --- a/vendor/symfony/console/Symfony/Component/Console/Tests/Helper/ProgressBarTest.php +++ /dev/null @@ -1,598 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Tests\Helper; - -use Symfony\Component\Console\Helper\ProgressBar; -use Symfony\Component\Console\Helper\Helper; -use Symfony\Component\Console\Output\StreamOutput; - -class ProgressBarTest extends \PHPUnit_Framework_TestCase -{ - public function testMultipleStart() - { - $bar = new ProgressBar($output = $this->getOutputStream()); - $bar->start(); - $bar->advance(); - $bar->start(); - - rewind($output->getStream()); - $this->assertEquals( - $this->generateOutput(' 0 [>---------------------------]'). - $this->generateOutput(' 1 [->--------------------------]'). - $this->generateOutput(' 0 [>---------------------------]'), - stream_get_contents($output->getStream()) - ); - } - - public function testAdvance() - { - $bar = new ProgressBar($output = $this->getOutputStream()); - $bar->start(); - $bar->advance(); - - rewind($output->getStream()); - $this->assertEquals( - $this->generateOutput(' 0 [>---------------------------]'). - $this->generateOutput(' 1 [->--------------------------]'), - stream_get_contents($output->getStream()) - ); - } - - public function testAdvanceWithStep() - { - $bar = new ProgressBar($output = $this->getOutputStream()); - $bar->start(); - $bar->advance(5); - - rewind($output->getStream()); - $this->assertEquals( - $this->generateOutput(' 0 [>---------------------------]'). - $this->generateOutput(' 5 [----->----------------------]'), - stream_get_contents($output->getStream()) - ); - } - - public function testAdvanceMultipleTimes() - { - $bar = new ProgressBar($output = $this->getOutputStream()); - $bar->start(); - $bar->advance(3); - $bar->advance(2); - - rewind($output->getStream()); - $this->assertEquals( - $this->generateOutput(' 0 [>---------------------------]'). - $this->generateOutput(' 3 [--->------------------------]'). - $this->generateOutput(' 5 [----->----------------------]'), - stream_get_contents($output->getStream()) - ); - } - - public function testAdvanceOverMax() - { - $bar = new ProgressBar($output = $this->getOutputStream(), 10); - $bar->setProgress(9); - $bar->advance(); - $bar->advance(); - - rewind($output->getStream()); - $this->assertEquals( - $this->generateOutput(' 9/10 [=========================>--] 90%'). - $this->generateOutput(' 10/10 [============================] 100%'). - $this->generateOutput(' 11/11 [============================] 100%'), - stream_get_contents($output->getStream()) - ); - } - - public function testCustomizations() - { - $bar = new ProgressBar($output = $this->getOutputStream(), 10); - $bar->setBarWidth(10); - $bar->setBarCharacter('_'); - $bar->setEmptyBarCharacter(' '); - $bar->setProgressCharacter('/'); - $bar->setFormat(' %current%/%max% [%bar%] %percent:3s%%'); - $bar->start(); - $bar->advance(); - - rewind($output->getStream()); - $this->assertEquals( - $this->generateOutput(' 0/10 [/ ] 0%'). - $this->generateOutput(' 1/10 [_/ ] 10%'), - stream_get_contents($output->getStream()) - ); - } - - public function testDisplayWithoutStart() - { - $bar = new ProgressBar($output = $this->getOutputStream(), 50); - $bar->display(); - - rewind($output->getStream()); - $this->assertEquals( - $this->generateOutput(' 0/50 [>---------------------------] 0%'), - stream_get_contents($output->getStream()) - ); - } - - public function testDisplayWithQuietVerbosity() - { - $bar = new ProgressBar($output = $this->getOutputStream(true, StreamOutput::VERBOSITY_QUIET), 50); - $bar->display(); - - rewind($output->getStream()); - $this->assertEquals( - '', - stream_get_contents($output->getStream()) - ); - } - - public function testFinishWithoutStart() - { - $bar = new ProgressBar($output = $this->getOutputStream(), 50); - $bar->finish(); - - rewind($output->getStream()); - $this->assertEquals( - $this->generateOutput(' 50/50 [============================] 100%'), - stream_get_contents($output->getStream()) - ); - } - - public function testPercent() - { - $bar = new ProgressBar($output = $this->getOutputStream(), 50); - $bar->start(); - $bar->display(); - $bar->advance(); - $bar->advance(); - - rewind($output->getStream()); - $this->assertEquals( - $this->generateOutput(' 0/50 [>---------------------------] 0%'). - $this->generateOutput(' 0/50 [>---------------------------] 0%'). - $this->generateOutput(' 1/50 [>---------------------------] 2%'). - $this->generateOutput(' 2/50 [=>--------------------------] 4%'), - stream_get_contents($output->getStream()) - ); - } - - public function testOverwriteWithShorterLine() - { - $bar = new ProgressBar($output = $this->getOutputStream(), 50); - $bar->setFormat(' %current%/%max% [%bar%] %percent:3s%%'); - $bar->start(); - $bar->display(); - $bar->advance(); - - // set shorter format - $bar->setFormat(' %current%/%max% [%bar%]'); - $bar->advance(); - - rewind($output->getStream()); - $this->assertEquals( - $this->generateOutput(' 0/50 [>---------------------------] 0%'). - $this->generateOutput(' 0/50 [>---------------------------] 0%'). - $this->generateOutput(' 1/50 [>---------------------------] 2%'). - $this->generateOutput(' 2/50 [=>--------------------------] '), - stream_get_contents($output->getStream()) - ); - } - - public function testStartWithMax() - { - $bar = new ProgressBar($output = $this->getOutputStream()); - $bar->setFormat('%current%/%max% [%bar%]'); - $bar->start(50); - $bar->advance(); - - rewind($output->getStream()); - $this->assertEquals( - $this->generateOutput(' 0/50 [>---------------------------]'). - $this->generateOutput(' 1/50 [>---------------------------]'), - stream_get_contents($output->getStream()) - ); - } - - public function testSetCurrentProgress() - { - $bar = new ProgressBar($output = $this->getOutputStream(), 50); - $bar->start(); - $bar->display(); - $bar->advance(); - $bar->setProgress(15); - $bar->setProgress(25); - - rewind($output->getStream()); - $this->assertEquals( - $this->generateOutput(' 0/50 [>---------------------------] 0%'). - $this->generateOutput(' 0/50 [>---------------------------] 0%'). - $this->generateOutput(' 1/50 [>---------------------------] 2%'). - $this->generateOutput(' 15/50 [========>-------------------] 30%'). - $this->generateOutput(' 25/50 [==============>-------------] 50%'), - stream_get_contents($output->getStream()) - ); - } - - /** - */ - public function testSetCurrentBeforeStarting() - { - $bar = new ProgressBar($this->getOutputStream()); - $bar->setProgress(15); - $this->assertNotNull($bar->getStartTime()); - } - - /** - * @expectedException \LogicException - * @expectedExceptionMessage You can't regress the progress bar - */ - public function testRegressProgress() - { - $bar = new ProgressBar($output = $this->getOutputStream(), 50); - $bar->start(); - $bar->setProgress(15); - $bar->setProgress(10); - } - - public function testRedrawFrequency() - { - $bar = $this->getMock('Symfony\Component\Console\Helper\ProgressBar', array('display'), array($output = $this->getOutputStream(), 6)); - $bar->expects($this->exactly(4))->method('display'); - - $bar->setRedrawFrequency(2); - $bar->start(); - $bar->setProgress(1); - $bar->advance(2); - $bar->advance(2); - $bar->advance(1); - } - - public function testMultiByteSupport() - { - if (!function_exists('mb_strlen') || (false === $encoding = mb_detect_encoding('■'))) { - $this->markTestSkipped('The mbstring extension is needed for multi-byte support'); - } - - $bar = new ProgressBar($output = $this->getOutputStream()); - $bar->start(); - $bar->setBarCharacter('■'); - $bar->advance(3); - - rewind($output->getStream()); - $this->assertEquals( - $this->generateOutput(' 0 [>---------------------------]'). - $this->generateOutput(' 3 [■■■>------------------------]'), - stream_get_contents($output->getStream()) - ); - } - - public function testClear() - { - $bar = new ProgressBar($output = $this->getOutputStream(), 50); - $bar->start(); - $bar->setProgress(25); - $bar->clear(); - - rewind($output->getStream()); - $this->assertEquals( - $this->generateOutput(' 0/50 [>---------------------------] 0%'). - $this->generateOutput(' 25/50 [==============>-------------] 50%'). - $this->generateOutput(' '), - stream_get_contents($output->getStream()) - ); - } - - public function testPercentNotHundredBeforeComplete() - { - $bar = new ProgressBar($output = $this->getOutputStream(), 200); - $bar->start(); - $bar->display(); - $bar->advance(199); - $bar->advance(); - - rewind($output->getStream()); - $this->assertEquals( - $this->generateOutput(' 0/200 [>---------------------------] 0%'). - $this->generateOutput(' 0/200 [>---------------------------] 0%'). - $this->generateOutput(' 199/200 [===========================>] 99%'). - $this->generateOutput(' 200/200 [============================] 100%'), - stream_get_contents($output->getStream()) - ); - } - - public function testNonDecoratedOutput() - { - $bar = new ProgressBar($output = $this->getOutputStream(false), 200); - $bar->start(); - - for ($i = 0; $i < 200; $i++) { - $bar->advance(); - } - - $bar->finish(); - - rewind($output->getStream()); - $this->assertEquals( - " 0/200 [>---------------------------] 0%\n". - " 20/200 [==>-------------------------] 10%\n". - " 40/200 [=====>----------------------] 20%\n". - " 60/200 [========>-------------------] 30%\n". - " 80/200 [===========>----------------] 40%\n". - " 100/200 [==============>-------------] 50%\n". - " 120/200 [================>-----------] 60%\n". - " 140/200 [===================>--------] 70%\n". - " 160/200 [======================>-----] 80%\n". - " 180/200 [=========================>--] 90%\n". - " 200/200 [============================] 100%", - stream_get_contents($output->getStream()) - ); - } - - public function testNonDecoratedOutputWithClear() - { - $bar = new ProgressBar($output = $this->getOutputStream(false), 50); - $bar->start(); - $bar->setProgress(25); - $bar->clear(); - $bar->setProgress(50); - $bar->finish(); - - rewind($output->getStream()); - $this->assertEquals( - " 0/50 [>---------------------------] 0%\n". - " 25/50 [==============>-------------] 50%\n". - " 50/50 [============================] 100%", - stream_get_contents($output->getStream()) - ); - } - - public function testNonDecoratedOutputWithoutMax() - { - $bar = new ProgressBar($output = $this->getOutputStream(false)); - $bar->start(); - $bar->advance(); - - rewind($output->getStream()); - $this->assertEquals( - " 0 [>---------------------------]\n". - " 1 [->--------------------------]", - stream_get_contents($output->getStream()) - ); - } - - public function testParallelBars() - { - $output = $this->getOutputStream(); - $bar1 = new ProgressBar($output, 2); - $bar2 = new ProgressBar($output, 3); - $bar2->setProgressCharacter('#'); - $bar3 = new ProgressBar($output); - - $bar1->start(); - $output->write("\n"); - $bar2->start(); - $output->write("\n"); - $bar3->start(); - - for ($i = 1; $i <= 3; $i++) { - // up two lines - $output->write("\033[2A"); - if ($i <= 2) { - $bar1->advance(); - } - $output->write("\n"); - $bar2->advance(); - $output->write("\n"); - $bar3->advance(); - } - $output->write("\033[2A"); - $output->write("\n"); - $output->write("\n"); - $bar3->finish(); - - rewind($output->getStream()); - $this->assertEquals( - $this->generateOutput(' 0/2 [>---------------------------] 0%')."\n". - $this->generateOutput(' 0/3 [#---------------------------] 0%')."\n". - rtrim($this->generateOutput(' 0 [>---------------------------]')). - - "\033[2A". - $this->generateOutput(' 1/2 [==============>-------------] 50%')."\n". - $this->generateOutput(' 1/3 [=========#------------------] 33%')."\n". - rtrim($this->generateOutput(' 1 [->--------------------------]')). - - "\033[2A". - $this->generateOutput(' 2/2 [============================] 100%')."\n". - $this->generateOutput(' 2/3 [==================#---------] 66%')."\n". - rtrim($this->generateOutput(' 2 [-->-------------------------]')). - - "\033[2A". - "\n". - $this->generateOutput(' 3/3 [============================] 100%')."\n". - rtrim($this->generateOutput(' 3 [--->------------------------]')). - - "\033[2A". - "\n". - "\n". - rtrim($this->generateOutput(' 3 [============================]')), - stream_get_contents($output->getStream()) - ); - } - - public function testWithoutMax() - { - $output = $this->getOutputStream(); - - $bar = new ProgressBar($output); - $bar->start(); - $bar->advance(); - $bar->advance(); - $bar->advance(); - $bar->finish(); - - rewind($output->getStream()); - $this->assertEquals( - rtrim($this->generateOutput(' 0 [>---------------------------]')). - rtrim($this->generateOutput(' 1 [->--------------------------]')). - rtrim($this->generateOutput(' 2 [-->-------------------------]')). - rtrim($this->generateOutput(' 3 [--->------------------------]')). - rtrim($this->generateOutput(' 3 [============================]')), - stream_get_contents($output->getStream()) - ); - } - - public function testAddingPlaceholderFormatter() - { - ProgressBar::setPlaceholderFormatterDefinition('remaining_steps', function (ProgressBar $bar) { - return $bar->getMaxSteps() - $bar->getProgress(); - }); - $bar = new ProgressBar($output = $this->getOutputStream(), 3); - $bar->setFormat(' %remaining_steps% [%bar%]'); - - $bar->start(); - $bar->advance(); - $bar->finish(); - - rewind($output->getStream()); - $this->assertEquals( - $this->generateOutput(' 3 [>---------------------------]'). - $this->generateOutput(' 2 [=========>------------------]'). - $this->generateOutput(' 0 [============================]'), - stream_get_contents($output->getStream()) - ); - } - - public function testMultilineFormat() - { - $bar = new ProgressBar($output = $this->getOutputStream(), 3); - $bar->setFormat("%bar%\nfoobar"); - - $bar->start(); - $bar->advance(); - $bar->clear(); - $bar->finish(); - - rewind($output->getStream()); - $this->assertEquals( - $this->generateOutput(">---------------------------\nfoobar"). - $this->generateOutput("=========>------------------\nfoobar "). - $this->generateOutput(" \n "). - $this->generateOutput("============================\nfoobar "), - stream_get_contents($output->getStream()) - ); - } - - public function testAnsiColorsAndEmojis() - { - $bar = new ProgressBar($output = $this->getOutputStream(), 15); - ProgressBar::setPlaceholderFormatterDefinition('memory', function (ProgressBar $bar) { - static $i = 0; - $mem = 100000 * $i; - $colors = $i++ ? '41;37' : '44;37'; - - return "\033[".$colors."m ".Helper::formatMemory($mem)." \033[0m"; - }); - $bar->setFormat(" \033[44;37m %title:-37s% \033[0m\n %current%/%max% %bar% %percent:3s%%\n 🏁 %remaining:-10s% %memory:37s%"); - $bar->setBarCharacter($done = "\033[32m●\033[0m"); - $bar->setEmptyBarCharacter($empty = "\033[31m●\033[0m"); - $bar->setProgressCharacter($progress = "\033[32m➤ \033[0m"); - - $bar->setMessage('Starting the demo... fingers crossed', 'title'); - $bar->start(); - $bar->setMessage('Looks good to me...', 'title'); - $bar->advance(4); - $bar->setMessage('Thanks, bye', 'title'); - $bar->finish(); - - rewind($output->getStream()); - $this->assertEquals( - $this->generateOutput( - " \033[44;37m Starting the demo... fingers crossed \033[0m\n". - " 0/15 ".$progress.str_repeat($empty, 26)." 0%\n". - " \xf0\x9f\x8f\x81 1 sec \033[44;37m 0 B \033[0m" - ). - $this->generateOutput( - " \033[44;37m Looks good to me... \033[0m\n". - " 4/15 ".str_repeat($done, 7).$progress.str_repeat($empty, 19)." 26%\n". - " \xf0\x9f\x8f\x81 1 sec \033[41;37m 97 KiB \033[0m" - ). - $this->generateOutput( - " \033[44;37m Thanks, bye \033[0m\n". - " 15/15 ".str_repeat($done, 28)." 100%\n". - " \xf0\x9f\x8f\x81 1 sec \033[41;37m 195 KiB \033[0m" - ), - stream_get_contents($output->getStream()) - ); - } - - public function testSetFormat() - { - $bar = new ProgressBar($output = $this->getOutputStream()); - $bar->setFormat('normal'); - $bar->start(); - rewind($output->getStream()); - $this->assertEquals( - $this->generateOutput(' 0 [>---------------------------]'), - stream_get_contents($output->getStream()) - ); - - $bar = new ProgressBar($output = $this->getOutputStream(), 10); - $bar->setFormat('normal'); - $bar->start(); - rewind($output->getStream()); - $this->assertEquals( - $this->generateOutput(' 0/10 [>---------------------------] 0%'), - stream_get_contents($output->getStream()) - ); - } - - /** - * @dataProvider provideFormat - */ - public function testFormatsWithoutMax($format) - { - $bar = new ProgressBar($output = $this->getOutputStream()); - $bar->setFormat($format); - $bar->start(); - - rewind($output->getStream()); - $this->assertNotEmpty(stream_get_contents($output->getStream())); - } - - /** - * Provides each defined format - * - * @return array - */ - public function provideFormat() - { - return array( - array('normal'), - array('verbose'), - array('very_verbose'), - array('debug'), - ); - } - - protected function getOutputStream($decorated = true, $verbosity = StreamOutput::VERBOSITY_NORMAL) - { - return new StreamOutput(fopen('php://memory', 'r+', false), $verbosity, $decorated); - } - - protected function generateOutput($expected) - { - $count = substr_count($expected, "\n"); - - return "\x0D".($count ? sprintf("\033[%dA", $count) : '').$expected; - } -} diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Helper/QuestionHelperTest.php b/vendor/symfony/console/Symfony/Component/Console/Tests/Helper/QuestionHelperTest.php deleted file mode 100644 index 0ab0849..0000000 --- a/vendor/symfony/console/Symfony/Component/Console/Tests/Helper/QuestionHelperTest.php +++ /dev/null @@ -1,238 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Tests\Helper; - -use Symfony\Component\Console\Helper\QuestionHelper; -use Symfony\Component\Console\Helper\HelperSet; -use Symfony\Component\Console\Helper\FormatterHelper; -use Symfony\Component\Console\Output\StreamOutput; -use Symfony\Component\Console\Question\ChoiceQuestion; -use Symfony\Component\Console\Question\ConfirmationQuestion; -use Symfony\Component\Console\Question\Question; - -/** - * @group tty - */ -class QuestionHelperTest extends \PHPUnit_Framework_TestCase -{ - public function testAskChoice() - { - $questionHelper = new QuestionHelper(); - - $helperSet = new HelperSet(array(new FormatterHelper())); - $questionHelper->setHelperSet($helperSet); - - $heroes = array('Superman', 'Batman', 'Spiderman'); - - $questionHelper->setInputStream($this->getInputStream("\n1\n 1 \nFabien\n1\nFabien\n1\n0,2\n 0 , 2 \n\n\n")); - - $question = new ChoiceQuestion('What is your favorite superhero?', $heroes, '2'); - // first answer is an empty answer, we're supposed to receive the default value - $this->assertEquals('Spiderman', $questionHelper->ask($this->createInputInterfaceMock(), $this->createOutputInterface(), $question)); - - $question = new ChoiceQuestion('What is your favorite superhero?', $heroes); - $this->assertEquals('Batman', $questionHelper->ask($this->createInputInterfaceMock(), $this->createOutputInterface(), $question)); - $this->assertEquals('Batman', $questionHelper->ask($this->createInputInterfaceMock(), $this->createOutputInterface(), $question)); - - $question = new ChoiceQuestion('What is your favorite superhero?', $heroes); - $question->setErrorMessage('Input "%s" is not a superhero!'); - $this->assertEquals('Batman', $questionHelper->ask($this->createInputInterfaceMock(), $output = $this->createOutputInterface(), $question)); - - rewind($output->getStream()); - $stream = stream_get_contents($output->getStream()); - $this->assertContains('Input "Fabien" is not a superhero!', $stream); - - try { - $question = new ChoiceQuestion('What is your favorite superhero?', $heroes, '1'); - $question->setMaxAttempts(1); - $questionHelper->ask($this->createInputInterfaceMock(), $output = $this->createOutputInterface(), $question); - $this->fail(); - } catch (\InvalidArgumentException $e) { - $this->assertEquals('Value "Fabien" is invalid', $e->getMessage()); - } - - $question = new ChoiceQuestion('What is your favorite superhero?', $heroes, null); - $question->setMultiselect(true); - - $this->assertEquals(array('Batman'), $questionHelper->ask($this->createInputInterfaceMock(), $this->createOutputInterface(), $question)); - $this->assertEquals(array('Superman', 'Spiderman'), $questionHelper->ask($this->createInputInterfaceMock(), $this->createOutputInterface(), $question)); - $this->assertEquals(array('Superman', 'Spiderman'), $questionHelper->ask($this->createInputInterfaceMock(), $this->createOutputInterface(), $question)); - - $question = new ChoiceQuestion('What is your favorite superhero?', $heroes, '0,1'); - $question->setMultiselect(true); - - $this->assertEquals(array('Superman', 'Batman'), $questionHelper->ask($this->createInputInterfaceMock(), $this->createOutputInterface(), $question)); - - $question = new ChoiceQuestion('What is your favorite superhero?', $heroes, ' 0 , 1 '); - $question->setMultiselect(true); - - $this->assertEquals(array('Superman', 'Batman'), $questionHelper->ask($this->createInputInterfaceMock(), $this->createOutputInterface(), $question)); - } - - public function testAsk() - { - $dialog = new QuestionHelper(); - - $dialog->setInputStream($this->getInputStream("\n8AM\n")); - - $question = new Question('What time is it?', '2PM'); - $this->assertEquals('2PM', $dialog->ask($this->createInputInterfaceMock(), $this->createOutputInterface(), $question)); - - $question = new Question('What time is it?', '2PM'); - $this->assertEquals('8AM', $dialog->ask($this->createInputInterfaceMock(), $output = $this->createOutputInterface(), $question)); - - rewind($output->getStream()); - $this->assertEquals('What time is it?', stream_get_contents($output->getStream())); - } - - public function testAskWithAutocomplete() - { - if (!$this->hasSttyAvailable()) { - $this->markTestSkipped('`stty` is required to test autocomplete functionality'); - } - - // Acm<NEWLINE> - // Ac<BACKSPACE><BACKSPACE>s<TAB>Test<NEWLINE> - // <NEWLINE> - // <UP ARROW><UP ARROW><NEWLINE> - // <UP ARROW><UP ARROW><UP ARROW><UP ARROW><UP ARROW><TAB>Test<NEWLINE> - // <DOWN ARROW><NEWLINE> - // S<BACKSPACE><BACKSPACE><DOWN ARROW><DOWN ARROW><NEWLINE> - // F00<BACKSPACE><BACKSPACE>oo<TAB><NEWLINE> - $inputStream = $this->getInputStream("Acm\nAc\177\177s\tTest\n\n\033[A\033[A\n\033[A\033[A\033[A\033[A\033[A\tTest\n\033[B\nS\177\177\033[B\033[B\nF00\177\177oo\t\n"); - - $dialog = new QuestionHelper(); - $dialog->setInputStream($inputStream); - $helperSet = new HelperSet(array(new FormatterHelper())); - $dialog->setHelperSet($helperSet); - - $question = new Question('Please select a bundle', 'FrameworkBundle'); - $question->setAutocompleterValues(array('AcmeDemoBundle', 'AsseticBundle', 'SecurityBundle', 'FooBundle')); - - $this->assertEquals('AcmeDemoBundle', $dialog->ask($this->createInputInterfaceMock(), $this->createOutputInterface(), $question)); - $this->assertEquals('AsseticBundleTest', $dialog->ask($this->createInputInterfaceMock(), $this->createOutputInterface(), $question)); - $this->assertEquals('FrameworkBundle', $dialog->ask($this->createInputInterfaceMock(), $this->createOutputInterface(), $question)); - $this->assertEquals('SecurityBundle', $dialog->ask($this->createInputInterfaceMock(), $this->createOutputInterface(), $question)); - $this->assertEquals('FooBundleTest', $dialog->ask($this->createInputInterfaceMock(), $this->createOutputInterface(), $question)); - $this->assertEquals('AcmeDemoBundle', $dialog->ask($this->createInputInterfaceMock(), $this->createOutputInterface(), $question)); - $this->assertEquals('AsseticBundle', $dialog->ask($this->createInputInterfaceMock(), $this->createOutputInterface(), $question)); - $this->assertEquals('FooBundle', $dialog->ask($this->createInputInterfaceMock(), $this->createOutputInterface(), $question)); - } - - public function testAskHiddenResponse() - { - if ('\\' === DIRECTORY_SEPARATOR) { - $this->markTestSkipped('This test is not supported on Windows'); - } - - $dialog = new QuestionHelper(); - $dialog->setInputStream($this->getInputStream("8AM\n")); - - $question = new Question('What time is it?'); - $question->setHidden(true); - - $this->assertEquals('8AM', $dialog->ask($this->createInputInterfaceMock(), $this->createOutputInterface(), $question)); - } - - public function testAskConfirmation() - { - $dialog = new QuestionHelper(); - - $dialog->setInputStream($this->getInputStream("\n\n")); - $question = new ConfirmationQuestion('Do you like French fries?'); - $this->assertTrue($dialog->ask($this->createInputInterfaceMock(), $this->createOutputInterface(), $question)); - $question = new ConfirmationQuestion('Do you like French fries?', false); - $this->assertFalse($dialog->ask($this->createInputInterfaceMock(), $this->createOutputInterface(), $question)); - - $dialog->setInputStream($this->getInputStream("y\nyes\n")); - $question = new ConfirmationQuestion('Do you like French fries?', false); - $this->assertTrue($dialog->ask($this->createInputInterfaceMock(), $this->createOutputInterface(), $question)); - $question = new ConfirmationQuestion('Do you like French fries?', false); - $this->assertTrue($dialog->ask($this->createInputInterfaceMock(), $this->createOutputInterface(), $question)); - - $dialog->setInputStream($this->getInputStream("n\nno\n")); - $question = new ConfirmationQuestion('Do you like French fries?', true); - $this->assertFalse($dialog->ask($this->createInputInterfaceMock(), $this->createOutputInterface(), $question)); - $question = new ConfirmationQuestion('Do you like French fries?', true); - $this->assertFalse($dialog->ask($this->createInputInterfaceMock(), $this->createOutputInterface(), $question)); - } - - public function testAskAndValidate() - { - $dialog = new QuestionHelper(); - $helperSet = new HelperSet(array(new FormatterHelper())); - $dialog->setHelperSet($helperSet); - - $error = 'This is not a color!'; - $validator = function ($color) use ($error) { - if (!in_array($color, array('white', 'black'))) { - throw new \InvalidArgumentException($error); - } - - return $color; - }; - - $question = new Question('What color was the white horse of Henry IV?', 'white'); - $question->setValidator($validator); - $question->setMaxAttempts(2); - - $dialog->setInputStream($this->getInputStream("\nblack\n")); - $this->assertEquals('white', $dialog->ask($this->createInputInterfaceMock(), $this->createOutputInterface(), $question)); - $this->assertEquals('black', $dialog->ask($this->createInputInterfaceMock(), $this->createOutputInterface(), $question)); - - $dialog->setInputStream($this->getInputStream("green\nyellow\norange\n")); - try { - $this->assertEquals('white', $dialog->ask($this->createInputInterfaceMock(), $this->createOutputInterface(), $question)); - $this->fail(); - } catch (\InvalidArgumentException $e) { - $this->assertEquals($error, $e->getMessage()); - } - } - - public function testNoInteraction() - { - $dialog = new QuestionHelper(); - $question = new Question('Do you have a job?', 'not yet'); - $this->assertEquals('not yet', $dialog->ask($this->createInputInterfaceMock(false), $this->createOutputInterface(), $question)); - } - - protected function getInputStream($input) - { - $stream = fopen('php://memory', 'r+', false); - fwrite($stream, $input); - rewind($stream); - - return $stream; - } - - protected function createOutputInterface() - { - return new StreamOutput(fopen('php://memory', 'r+', false)); - } - - protected function createInputInterfaceMock($interactive = true) - { - $mock = $this->getMock('Symfony\Component\Console\Input\InputInterface'); - $mock->expects($this->any()) - ->method('isInteractive') - ->will($this->returnValue($interactive)); - - return $mock; - } - - private function hasSttyAvailable() - { - exec('stty 2>&1', $output, $exitcode); - - return $exitcode === 0; - } -} diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Helper/TableTest.php b/vendor/symfony/console/Symfony/Component/Console/Tests/Helper/TableTest.php deleted file mode 100644 index 18a2ab6..0000000 --- a/vendor/symfony/console/Symfony/Component/Console/Tests/Helper/TableTest.php +++ /dev/null @@ -1,357 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Tests\Helper; - -use Symfony\Component\Console\Helper\Table; -use Symfony\Component\Console\Helper\TableStyle; -use Symfony\Component\Console\Helper\TableSeparator; -use Symfony\Component\Console\Output\StreamOutput; - -class TableTest extends \PHPUnit_Framework_TestCase -{ - protected $stream; - - protected function setUp() - { - $this->stream = fopen('php://memory', 'r+'); - } - - protected function tearDown() - { - fclose($this->stream); - $this->stream = null; - } - - /** - * @dataProvider testRenderProvider - */ - public function testRender($headers, $rows, $style, $expected) - { - $table = new Table($output = $this->getOutputStream()); - $table - ->setHeaders($headers) - ->setRows($rows) - ->setStyle($style) - ; - $table->render(); - - $this->assertEquals($expected, $this->getOutputContent($output)); - } - - /** - * @dataProvider testRenderProvider - */ - public function testRenderAddRows($headers, $rows, $style, $expected) - { - $table = new Table($output = $this->getOutputStream()); - $table - ->setHeaders($headers) - ->addRows($rows) - ->setStyle($style) - ; - $table->render(); - - $this->assertEquals($expected, $this->getOutputContent($output)); - } - - /** - * @dataProvider testRenderProvider - */ - public function testRenderAddRowsOneByOne($headers, $rows, $style, $expected) - { - $table = new Table($output = $this->getOutputStream()); - $table - ->setHeaders($headers) - ->setStyle($style) - ; - foreach ($rows as $row) { - $table->addRow($row); - } - $table->render(); - - $this->assertEquals($expected, $this->getOutputContent($output)); - } - - public function testRenderProvider() - { - $books = array( - array('99921-58-10-7', 'Divine Comedy', 'Dante Alighieri'), - array('9971-5-0210-0', 'A Tale of Two Cities', 'Charles Dickens'), - array('960-425-059-0', 'The Lord of the Rings', 'J. R. R. Tolkien'), - array('80-902734-1-6', 'And Then There Were None', 'Agatha Christie'), - ); - - return array( - array( - array('ISBN', 'Title', 'Author'), - $books, - 'default', -<<<TABLE -+---------------+--------------------------+------------------+ -| ISBN | Title | Author | -+---------------+--------------------------+------------------+ -| 99921-58-10-7 | Divine Comedy | Dante Alighieri | -| 9971-5-0210-0 | A Tale of Two Cities | Charles Dickens | -| 960-425-059-0 | The Lord of the Rings | J. R. R. Tolkien | -| 80-902734-1-6 | And Then There Were None | Agatha Christie | -+---------------+--------------------------+------------------+ - -TABLE - ), - array( - array('ISBN', 'Title', 'Author'), - $books, - 'compact', -<<<TABLE - ISBN Title Author - 99921-58-10-7 Divine Comedy Dante Alighieri - 9971-5-0210-0 A Tale of Two Cities Charles Dickens - 960-425-059-0 The Lord of the Rings J. R. R. Tolkien - 80-902734-1-6 And Then There Were None Agatha Christie - -TABLE - ), - array( - array('ISBN', 'Title', 'Author'), - $books, - 'borderless', -<<<TABLE - =============== ========================== ================== - ISBN Title Author - =============== ========================== ================== - 99921-58-10-7 Divine Comedy Dante Alighieri - 9971-5-0210-0 A Tale of Two Cities Charles Dickens - 960-425-059-0 The Lord of the Rings J. R. R. Tolkien - 80-902734-1-6 And Then There Were None Agatha Christie - =============== ========================== ================== - -TABLE - ), - array( - array('ISBN', 'Title'), - array( - array('99921-58-10-7', 'Divine Comedy', 'Dante Alighieri'), - array('9971-5-0210-0'), - array('960-425-059-0', 'The Lord of the Rings', 'J. R. R. Tolkien'), - array('80-902734-1-6', 'And Then There Were None', 'Agatha Christie'), - ), - 'default', -<<<TABLE -+---------------+--------------------------+------------------+ -| ISBN | Title | | -+---------------+--------------------------+------------------+ -| 99921-58-10-7 | Divine Comedy | Dante Alighieri | -| 9971-5-0210-0 | | | -| 960-425-059-0 | The Lord of the Rings | J. R. R. Tolkien | -| 80-902734-1-6 | And Then There Were None | Agatha Christie | -+---------------+--------------------------+------------------+ - -TABLE - ), - array( - array(), - array( - array('99921-58-10-7', 'Divine Comedy', 'Dante Alighieri'), - array('9971-5-0210-0'), - array('960-425-059-0', 'The Lord of the Rings', 'J. R. R. Tolkien'), - array('80-902734-1-6', 'And Then There Were None', 'Agatha Christie'), - ), - 'default', -<<<TABLE -+---------------+--------------------------+------------------+ -| 99921-58-10-7 | Divine Comedy | Dante Alighieri | -| 9971-5-0210-0 | | | -| 960-425-059-0 | The Lord of the Rings | J. R. R. Tolkien | -| 80-902734-1-6 | And Then There Were None | Agatha Christie | -+---------------+--------------------------+------------------+ - -TABLE - ), - array( - array('ISBN', 'Title', 'Author'), - array( - array("99921-58-10-7", "Divine\nComedy", "Dante Alighieri"), - array("9971-5-0210-2", "Harry Potter\nand the Chamber of Secrets", "Rowling\nJoanne K."), - array("9971-5-0210-2", "Harry Potter\nand the Chamber of Secrets", "Rowling\nJoanne K."), - array("960-425-059-0", "The Lord of the Rings", "J. R. R.\nTolkien"), - ), - 'default', -<<<TABLE -+---------------+----------------------------+-----------------+ -| ISBN | Title | Author | -+---------------+----------------------------+-----------------+ -| 99921-58-10-7 | Divine | Dante Alighieri | -| | Comedy | | -| 9971-5-0210-2 | Harry Potter | Rowling | -| | and the Chamber of Secrets | Joanne K. | -| 9971-5-0210-2 | Harry Potter | Rowling | -| | and the Chamber of Secrets | Joanne K. | -| 960-425-059-0 | The Lord of the Rings | J. R. R. | -| | | Tolkien | -+---------------+----------------------------+-----------------+ - -TABLE - ), - array( - array('ISBN', 'Title'), - array(), - 'default', -<<<TABLE -+------+-------+ -| ISBN | Title | -+------+-------+ - -TABLE - ), - array( - array(), - array(), - 'default', - '', - ), - 'Cell text with tags used for Output styling' => array( - array('ISBN', 'Title', 'Author'), - array( - array('<info>99921-58-10-7</info>', '<error>Divine Comedy</error>', '<fg=blue;bg=white>Dante Alighieri</fg=blue;bg=white>'), - array('9971-5-0210-0', 'A Tale of Two Cities', '<info>Charles Dickens</>'), - ), - 'default', -<<<TABLE -+---------------+----------------------+-----------------+ -| ISBN | Title | Author | -+---------------+----------------------+-----------------+ -| 99921-58-10-7 | Divine Comedy | Dante Alighieri | -| 9971-5-0210-0 | A Tale of Two Cities | Charles Dickens | -+---------------+----------------------+-----------------+ - -TABLE - ), - 'Cell text with tags not used for Output styling' => array( - array('ISBN', 'Title', 'Author'), - array( - array('<strong>99921-58-10-700</strong>', '<f>Divine Com</f>', 'Dante Alighieri'), - array('9971-5-0210-0', 'A Tale of Two Cities', 'Charles Dickens'), - ), - 'default', -<<<TABLE -+----------------------------------+----------------------+-----------------+ -| ISBN | Title | Author | -+----------------------------------+----------------------+-----------------+ -| <strong>99921-58-10-700</strong> | <f>Divine Com</f> | Dante Alighieri | -| 9971-5-0210-0 | A Tale of Two Cities | Charles Dickens | -+----------------------------------+----------------------+-----------------+ - -TABLE - ), - ); - } - - public function testRenderMultiByte() - { - if (!function_exists('mb_strlen')) { - $this->markTestSkipped('The "mbstring" extension is not available'); - } - - $table = new Table($output = $this->getOutputStream()); - $table - ->setHeaders(array('■■')) - ->setRows(array(array(1234))) - ->setStyle('default') - ; - $table->render(); - - $expected = -<<<TABLE -+------+ -| ■■ | -+------+ -| 1234 | -+------+ - -TABLE; - - $this->assertEquals($expected, $this->getOutputContent($output)); - } - - public function testStyle() - { - $style = new TableStyle(); - $style - ->setHorizontalBorderChar('.') - ->setVerticalBorderChar('.') - ->setCrossingChar('.') - ; - - Table::setStyleDefinition('dotfull', $style); - $table = new Table($output = $this->getOutputStream()); - $table - ->setHeaders(array('Foo')) - ->setRows(array(array('Bar'))) - ->setStyle('dotfull'); - $table->render(); - - $expected = -<<<TABLE -....... -. Foo . -....... -. Bar . -....... - -TABLE; - - $this->assertEquals($expected, $this->getOutputContent($output)); - } - - public function testRowSeparator() - { - $table = new Table($output = $this->getOutputStream()); - $table - ->setHeaders(array('Foo')) - ->setRows(array( - array('Bar1'), - new TableSeparator(), - array('Bar2'), - new TableSeparator(), - array('Bar3'), - )); - $table->render(); - - $expected = -<<<TABLE -+------+ -| Foo | -+------+ -| Bar1 | -+------+ -| Bar2 | -+------+ -| Bar3 | -+------+ - -TABLE; - - $this->assertEquals($expected, $this->getOutputContent($output)); - } - - protected function getOutputStream() - { - return new StreamOutput($this->stream, StreamOutput::VERBOSITY_NORMAL, false); - } - - protected function getOutputContent(StreamOutput $output) - { - rewind($output->getStream()); - - return str_replace(PHP_EOL, "\n", stream_get_contents($output->getStream())); - } -} diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Input/ArgvInputTest.php b/vendor/symfony/console/Symfony/Component/Console/Tests/Input/ArgvInputTest.php deleted file mode 100644 index d2c540e..0000000 --- a/vendor/symfony/console/Symfony/Component/Console/Tests/Input/ArgvInputTest.php +++ /dev/null @@ -1,317 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Tests\Input; - -use Symfony\Component\Console\Input\ArgvInput; -use Symfony\Component\Console\Input\InputDefinition; -use Symfony\Component\Console\Input\InputArgument; -use Symfony\Component\Console\Input\InputOption; - -class ArgvInputTest extends \PHPUnit_Framework_TestCase -{ - public function testConstructor() - { - $_SERVER['argv'] = array('cli.php', 'foo'); - $input = new ArgvInput(); - $r = new \ReflectionObject($input); - $p = $r->getProperty('tokens'); - $p->setAccessible(true); - - $this->assertEquals(array('foo'), $p->getValue($input), '__construct() automatically get its input from the argv server variable'); - } - - public function testParseArguments() - { - $input = new ArgvInput(array('cli.php', 'foo')); - $input->bind(new InputDefinition(array(new InputArgument('name')))); - $this->assertEquals(array('name' => 'foo'), $input->getArguments(), '->parse() parses required arguments'); - - $input->bind(new InputDefinition(array(new InputArgument('name')))); - $this->assertEquals(array('name' => 'foo'), $input->getArguments(), '->parse() is stateless'); - } - - /** - * @dataProvider provideOptions - */ - public function testParseOptions($input, $options, $expectedOptions, $message) - { - $input = new ArgvInput($input); - $input->bind(new InputDefinition($options)); - - $this->assertEquals($expectedOptions, $input->getOptions(), $message); - } - - public function provideOptions() - { - return array( - array( - array('cli.php', '--foo'), - array(new InputOption('foo')), - array('foo' => true), - '->parse() parses long options without a value', - ), - array( - array('cli.php', '--foo=bar'), - array(new InputOption('foo', 'f', InputOption::VALUE_REQUIRED)), - array('foo' => 'bar'), - '->parse() parses long options with a required value (with a = separator)', - ), - array( - array('cli.php', '--foo', 'bar'), - array(new InputOption('foo', 'f', InputOption::VALUE_REQUIRED)), - array('foo' => 'bar'), - '->parse() parses long options with a required value (with a space separator)', - ), - array( - array('cli.php', '-f'), - array(new InputOption('foo', 'f')), - array('foo' => true), - '->parse() parses short options without a value', - ), - array( - array('cli.php', '-fbar'), - array(new InputOption('foo', 'f', InputOption::VALUE_REQUIRED)), - array('foo' => 'bar'), - '->parse() parses short options with a required value (with no separator)', - ), - array( - array('cli.php', '-f', 'bar'), - array(new InputOption('foo', 'f', InputOption::VALUE_REQUIRED)), - array('foo' => 'bar'), - '->parse() parses short options with a required value (with a space separator)', - ), - array( - array('cli.php', '-f', ''), - array(new InputOption('foo', 'f', InputOption::VALUE_OPTIONAL)), - array('foo' => ''), - '->parse() parses short options with an optional empty value', - ), - array( - array('cli.php', '-f', '', 'foo'), - array(new InputArgument('name'), new InputOption('foo', 'f', InputOption::VALUE_OPTIONAL)), - array('foo' => ''), - '->parse() parses short options with an optional empty value followed by an argument', - ), - array( - array('cli.php', '-f', '', '-b'), - array(new InputOption('foo', 'f', InputOption::VALUE_OPTIONAL), new InputOption('bar', 'b')), - array('foo' => '', 'bar' => true), - '->parse() parses short options with an optional empty value followed by an option', - ), - array( - array('cli.php', '-f', '-b', 'foo'), - array(new InputArgument('name'), new InputOption('foo', 'f', InputOption::VALUE_OPTIONAL), new InputOption('bar', 'b')), - array('foo' => null, 'bar' => true), - '->parse() parses short options with an optional value which is not present', - ), - array( - array('cli.php', '-fb'), - array(new InputOption('foo', 'f'), new InputOption('bar', 'b')), - array('foo' => true, 'bar' => true), - '->parse() parses short options when they are aggregated as a single one', - ), - array( - array('cli.php', '-fb', 'bar'), - array(new InputOption('foo', 'f'), new InputOption('bar', 'b', InputOption::VALUE_REQUIRED)), - array('foo' => true, 'bar' => 'bar'), - '->parse() parses short options when they are aggregated as a single one and the last one has a required value', - ), - array( - array('cli.php', '-fb', 'bar'), - array(new InputOption('foo', 'f'), new InputOption('bar', 'b', InputOption::VALUE_OPTIONAL)), - array('foo' => true, 'bar' => 'bar'), - '->parse() parses short options when they are aggregated as a single one and the last one has an optional value', - ), - array( - array('cli.php', '-fbbar'), - array(new InputOption('foo', 'f'), new InputOption('bar', 'b', InputOption::VALUE_OPTIONAL)), - array('foo' => true, 'bar' => 'bar'), - '->parse() parses short options when they are aggregated as a single one and the last one has an optional value with no separator', - ), - array( - array('cli.php', '-fbbar'), - array(new InputOption('foo', 'f', InputOption::VALUE_OPTIONAL), new InputOption('bar', 'b', InputOption::VALUE_OPTIONAL)), - array('foo' => 'bbar', 'bar' => null), - '->parse() parses short options when they are aggregated as a single one and one of them takes a value', - ), - ); - } - - /** - * @dataProvider provideInvalidInput - */ - public function testInvalidInput($argv, $definition, $expectedExceptionMessage) - { - $this->setExpectedException('RuntimeException', $expectedExceptionMessage); - - $input = new ArgvInput($argv); - $input->bind($definition); - } - - public function provideInvalidInput() - { - return array( - array( - array('cli.php', '--foo'), - new InputDefinition(array(new InputOption('foo', 'f', InputOption::VALUE_REQUIRED))), - 'The "--foo" option requires a value.', - ), - array( - array('cli.php', '-f'), - new InputDefinition(array(new InputOption('foo', 'f', InputOption::VALUE_REQUIRED))), - 'The "--foo" option requires a value.', - ), - array( - array('cli.php', '-ffoo'), - new InputDefinition(array(new InputOption('foo', 'f', InputOption::VALUE_NONE))), - 'The "-o" option does not exist.', - ), - array( - array('cli.php', '--foo=bar'), - new InputDefinition(array(new InputOption('foo', 'f', InputOption::VALUE_NONE))), - 'The "--foo" option does not accept a value.', - ), - array( - array('cli.php', 'foo', 'bar'), - new InputDefinition(), - 'Too many arguments.', - ), - array( - array('cli.php', '--foo'), - new InputDefinition(), - 'The "--foo" option does not exist.', - ), - array( - array('cli.php', '-f'), - new InputDefinition(), - 'The "-f" option does not exist.', - ), - array( - array('cli.php', '-1'), - new InputDefinition(array(new InputArgument('number'))), - 'The "-1" option does not exist.', - ), - ); - } - - public function testParseArrayArgument() - { - $input = new ArgvInput(array('cli.php', 'foo', 'bar', 'baz', 'bat')); - $input->bind(new InputDefinition(array(new InputArgument('name', InputArgument::IS_ARRAY)))); - - $this->assertEquals(array('name' => array('foo', 'bar', 'baz', 'bat')), $input->getArguments(), '->parse() parses array arguments'); - } - - public function testParseArrayOption() - { - $input = new ArgvInput(array('cli.php', '--name=foo', '--name=bar', '--name=baz')); - $input->bind(new InputDefinition(array(new InputOption('name', null, InputOption::VALUE_OPTIONAL | InputOption::VALUE_IS_ARRAY)))); - - $this->assertEquals(array('name' => array('foo', 'bar', 'baz')), $input->getOptions(), '->parse() parses array options ("--option=value" syntax)'); - - $input = new ArgvInput(array('cli.php', '--name', 'foo', '--name', 'bar', '--name', 'baz')); - $input->bind(new InputDefinition(array(new InputOption('name', null, InputOption::VALUE_OPTIONAL | InputOption::VALUE_IS_ARRAY)))); - $this->assertEquals(array('name' => array('foo', 'bar', 'baz')), $input->getOptions(), '->parse() parses array options ("--option value" syntax)'); - - $input = new ArgvInput(array('cli.php', '--name=foo', '--name=bar', '--name=')); - $input->bind(new InputDefinition(array(new InputOption('name', null, InputOption::VALUE_OPTIONAL | InputOption::VALUE_IS_ARRAY)))); - $this->assertSame(array('name' => array('foo', 'bar', null)), $input->getOptions(), '->parse() parses empty array options as null ("--option=value" syntax)'); - - $input = new ArgvInput(array('cli.php', '--name', 'foo', '--name', 'bar', '--name', '--anotherOption')); - $input->bind(new InputDefinition(array( - new InputOption('name', null, InputOption::VALUE_OPTIONAL | InputOption::VALUE_IS_ARRAY), - new InputOption('anotherOption', null, InputOption::VALUE_NONE), - ))); - $this->assertSame(array('name' => array('foo', 'bar', null), 'anotherOption' => true), $input->getOptions(), '->parse() parses empty array options as null ("--option value" syntax)'); - } - - public function testParseNegativeNumberAfterDoubleDash() - { - $input = new ArgvInput(array('cli.php', '--', '-1')); - $input->bind(new InputDefinition(array(new InputArgument('number')))); - $this->assertEquals(array('number' => '-1'), $input->getArguments(), '->parse() parses arguments with leading dashes as arguments after having encountered a double-dash sequence'); - - $input = new ArgvInput(array('cli.php', '-f', 'bar', '--', '-1')); - $input->bind(new InputDefinition(array(new InputArgument('number'), new InputOption('foo', 'f', InputOption::VALUE_OPTIONAL)))); - $this->assertEquals(array('foo' => 'bar'), $input->getOptions(), '->parse() parses arguments with leading dashes as options before having encountered a double-dash sequence'); - $this->assertEquals(array('number' => '-1'), $input->getArguments(), '->parse() parses arguments with leading dashes as arguments after having encountered a double-dash sequence'); - } - - public function testParseEmptyStringArgument() - { - $input = new ArgvInput(array('cli.php', '-f', 'bar', '')); - $input->bind(new InputDefinition(array(new InputArgument('empty'), new InputOption('foo', 'f', InputOption::VALUE_OPTIONAL)))); - - $this->assertEquals(array('empty' => ''), $input->getArguments(), '->parse() parses empty string arguments'); - } - - public function testGetFirstArgument() - { - $input = new ArgvInput(array('cli.php', '-fbbar')); - $this->assertNull($input->getFirstArgument(), '->getFirstArgument() returns null when there is no arguments'); - - $input = new ArgvInput(array('cli.php', '-fbbar', 'foo')); - $this->assertEquals('foo', $input->getFirstArgument(), '->getFirstArgument() returns the first argument from the raw input'); - } - - public function testHasParameterOption() - { - $input = new ArgvInput(array('cli.php', '-f', 'foo')); - $this->assertTrue($input->hasParameterOption('-f'), '->hasParameterOption() returns true if the given short option is in the raw input'); - - $input = new ArgvInput(array('cli.php', '--foo', 'foo')); - $this->assertTrue($input->hasParameterOption('--foo'), '->hasParameterOption() returns true if the given short option is in the raw input'); - - $input = new ArgvInput(array('cli.php', 'foo')); - $this->assertFalse($input->hasParameterOption('--foo'), '->hasParameterOption() returns false if the given short option is not in the raw input'); - - $input = new ArgvInput(array('cli.php', '--foo=bar')); - $this->assertTrue($input->hasParameterOption('--foo'), '->hasParameterOption() returns true if the given option with provided value is in the raw input'); - } - - public function testToString() - { - $input = new ArgvInput(array('cli.php', '-f', 'foo')); - $this->assertEquals('-f foo', (string) $input); - - $input = new ArgvInput(array('cli.php', '-f', '--bar=foo', 'a b c d', "A\nB'C")); - $this->assertEquals('-f --bar=foo '.escapeshellarg('a b c d').' '.escapeshellarg("A\nB'C"), (string) $input); - } - - /** - * @dataProvider provideGetParameterOptionValues - */ - public function testGetParameterOptionEqualSign($argv, $key, $expected) - { - $input = new ArgvInput($argv); - $this->assertEquals($expected, $input->getParameterOption($key), '->getParameterOption() returns the expected value'); - } - - public function provideGetParameterOptionValues() - { - return array( - array(array('app/console', 'foo:bar', '-e', 'dev'), '-e', 'dev'), - array(array('app/console', 'foo:bar', '--env=dev'), '--env', 'dev'), - array(array('app/console', 'foo:bar', '-e', 'dev'), array('-e', '--env'), 'dev'), - array(array('app/console', 'foo:bar', '--env=dev'), array('-e', '--env'), 'dev'), - array(array('app/console', 'foo:bar', '--env=dev', '--en=1'), array('--en'), '1'), - array(array('app/console', 'foo:bar', '--env=dev', '', '--en=1'), array('--en'), '1'), - ); - } - - public function testParseSingleDashAsArgument() - { - $input = new ArgvInput(array('cli.php', '-')); - $input->bind(new InputDefinition(array(new InputArgument('file')))); - $this->assertEquals(array('file' => '-'), $input->getArguments(), '->parse() parses single dash as an argument'); - } -} diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Input/ArrayInputTest.php b/vendor/symfony/console/Symfony/Component/Console/Tests/Input/ArrayInputTest.php deleted file mode 100644 index cc89083..0000000 --- a/vendor/symfony/console/Symfony/Component/Console/Tests/Input/ArrayInputTest.php +++ /dev/null @@ -1,138 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Tests\Input; - -use Symfony\Component\Console\Input\ArrayInput; -use Symfony\Component\Console\Input\InputDefinition; -use Symfony\Component\Console\Input\InputArgument; -use Symfony\Component\Console\Input\InputOption; - -class ArrayInputTest extends \PHPUnit_Framework_TestCase -{ - public function testGetFirstArgument() - { - $input = new ArrayInput(array()); - $this->assertNull($input->getFirstArgument(), '->getFirstArgument() returns null if no argument were passed'); - $input = new ArrayInput(array('name' => 'Fabien')); - $this->assertEquals('Fabien', $input->getFirstArgument(), '->getFirstArgument() returns the first passed argument'); - $input = new ArrayInput(array('--foo' => 'bar', 'name' => 'Fabien')); - $this->assertEquals('Fabien', $input->getFirstArgument(), '->getFirstArgument() returns the first passed argument'); - } - - public function testHasParameterOption() - { - $input = new ArrayInput(array('name' => 'Fabien', '--foo' => 'bar')); - $this->assertTrue($input->hasParameterOption('--foo'), '->hasParameterOption() returns true if an option is present in the passed parameters'); - $this->assertFalse($input->hasParameterOption('--bar'), '->hasParameterOption() returns false if an option is not present in the passed parameters'); - - $input = new ArrayInput(array('--foo')); - $this->assertTrue($input->hasParameterOption('--foo'), '->hasParameterOption() returns true if an option is present in the passed parameters'); - } - - public function testGetParameterOption() - { - $input = new ArrayInput(array('name' => 'Fabien', '--foo' => 'bar')); - $this->assertEquals('bar', $input->getParameterOption('--foo'), '->getParameterOption() returns the option of specified name'); - - $input = new ArrayInput(array('Fabien', '--foo' => 'bar')); - $this->assertEquals('bar', $input->getParameterOption('--foo'), '->getParameterOption() returns the option of specified name'); - } - - public function testParseArguments() - { - $input = new ArrayInput(array('name' => 'foo'), new InputDefinition(array(new InputArgument('name')))); - - $this->assertEquals(array('name' => 'foo'), $input->getArguments(), '->parse() parses required arguments'); - } - - /** - * @dataProvider provideOptions - */ - public function testParseOptions($input, $options, $expectedOptions, $message) - { - $input = new ArrayInput($input, new InputDefinition($options)); - - $this->assertEquals($expectedOptions, $input->getOptions(), $message); - } - - public function provideOptions() - { - return array( - array( - array('--foo' => 'bar'), - array(new InputOption('foo')), - array('foo' => 'bar'), - '->parse() parses long options', - ), - array( - array('--foo' => 'bar'), - array(new InputOption('foo', 'f', InputOption::VALUE_OPTIONAL, '', 'default')), - array('foo' => 'bar'), - '->parse() parses long options with a default value', - ), - array( - array('--foo' => null), - array(new InputOption('foo', 'f', InputOption::VALUE_OPTIONAL, '', 'default')), - array('foo' => 'default'), - '->parse() parses long options with a default value', - ), - array( - array('-f' => 'bar'), - array(new InputOption('foo', 'f')), - array('foo' => 'bar'), - '->parse() parses short options', - ), - ); - } - - /** - * @dataProvider provideInvalidInput - */ - public function testParseInvalidInput($parameters, $definition, $expectedExceptionMessage) - { - $this->setExpectedException('InvalidArgumentException', $expectedExceptionMessage); - - new ArrayInput($parameters, $definition); - } - - public function provideInvalidInput() - { - return array( - array( - array('foo' => 'foo'), - new InputDefinition(array(new InputArgument('name'))), - 'The "foo" argument does not exist.', - ), - array( - array('--foo' => null), - new InputDefinition(array(new InputOption('foo', 'f', InputOption::VALUE_REQUIRED))), - 'The "--foo" option requires a value.', - ), - array( - array('--foo' => 'foo'), - new InputDefinition(), - 'The "--foo" option does not exist.', - ), - array( - array('-o' => 'foo'), - new InputDefinition(), - 'The "-o" option does not exist.', - ), - ); - } - - public function testToString() - { - $input = new ArrayInput(array('-f' => null, '-b' => 'bar', '--foo' => 'b a z', '--lala' => null, 'test' => 'Foo', 'test2' => "A\nB'C")); - $this->assertEquals('-f -b=bar --foo='.escapeshellarg('b a z').' --lala Foo '.escapeshellarg("A\nB'C"), (string) $input); - } -} diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Input/InputArgumentTest.php b/vendor/symfony/console/Symfony/Component/Console/Tests/Input/InputArgumentTest.php deleted file mode 100644 index cfb37cd..0000000 --- a/vendor/symfony/console/Symfony/Component/Console/Tests/Input/InputArgumentTest.php +++ /dev/null @@ -1,111 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Tests\Input; - -use Symfony\Component\Console\Input\InputArgument; - -class InputArgumentTest extends \PHPUnit_Framework_TestCase -{ - public function testConstructor() - { - $argument = new InputArgument('foo'); - $this->assertEquals('foo', $argument->getName(), '__construct() takes a name as its first argument'); - } - - public function testModes() - { - $argument = new InputArgument('foo'); - $this->assertFalse($argument->isRequired(), '__construct() gives a "InputArgument::OPTIONAL" mode by default'); - - $argument = new InputArgument('foo', null); - $this->assertFalse($argument->isRequired(), '__construct() can take "InputArgument::OPTIONAL" as its mode'); - - $argument = new InputArgument('foo', InputArgument::OPTIONAL); - $this->assertFalse($argument->isRequired(), '__construct() can take "InputArgument::OPTIONAL" as its mode'); - - $argument = new InputArgument('foo', InputArgument::REQUIRED); - $this->assertTrue($argument->isRequired(), '__construct() can take "InputArgument::REQUIRED" as its mode'); - } - - /** - * @dataProvider provideInvalidModes - */ - public function testInvalidModes($mode) - { - $this->setExpectedException('InvalidArgumentException', sprintf('Argument mode "%s" is not valid.', $mode)); - - new InputArgument('foo', $mode); - } - - public function provideInvalidModes() - { - return array( - array('ANOTHER_ONE'), - array(-1), - ); - } - - public function testIsArray() - { - $argument = new InputArgument('foo', InputArgument::IS_ARRAY); - $this->assertTrue($argument->isArray(), '->isArray() returns true if the argument can be an array'); - $argument = new InputArgument('foo', InputArgument::OPTIONAL | InputArgument::IS_ARRAY); - $this->assertTrue($argument->isArray(), '->isArray() returns true if the argument can be an array'); - $argument = new InputArgument('foo', InputArgument::OPTIONAL); - $this->assertFalse($argument->isArray(), '->isArray() returns false if the argument can not be an array'); - } - - public function testGetDescription() - { - $argument = new InputArgument('foo', null, 'Some description'); - $this->assertEquals('Some description', $argument->getDescription(), '->getDescription() return the message description'); - } - - public function testGetDefault() - { - $argument = new InputArgument('foo', InputArgument::OPTIONAL, '', 'default'); - $this->assertEquals('default', $argument->getDefault(), '->getDefault() return the default value'); - } - - public function testSetDefault() - { - $argument = new InputArgument('foo', InputArgument::OPTIONAL, '', 'default'); - $argument->setDefault(null); - $this->assertNull($argument->getDefault(), '->setDefault() can reset the default value by passing null'); - $argument->setDefault('another'); - $this->assertEquals('another', $argument->getDefault(), '->setDefault() changes the default value'); - - $argument = new InputArgument('foo', InputArgument::OPTIONAL | InputArgument::IS_ARRAY); - $argument->setDefault(array(1, 2)); - $this->assertEquals(array(1, 2), $argument->getDefault(), '->setDefault() changes the default value'); - } - - /** - * @expectedException \LogicException - * @expectedExceptionMessage Cannot set a default value except for InputArgument::OPTIONAL mode. - */ - public function testSetDefaultWithRequiredArgument() - { - $argument = new InputArgument('foo', InputArgument::REQUIRED); - $argument->setDefault('default'); - } - - /** - * @expectedException \LogicException - * @expectedExceptionMessage A default value for an array argument must be an array. - */ - public function testSetDefaultWithArrayArgument() - { - $argument = new InputArgument('foo', InputArgument::IS_ARRAY); - $argument->setDefault('default'); - } -} diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Input/InputDefinitionTest.php b/vendor/symfony/console/Symfony/Component/Console/Tests/Input/InputDefinitionTest.php deleted file mode 100644 index ce0654d..0000000 --- a/vendor/symfony/console/Symfony/Component/Console/Tests/Input/InputDefinitionTest.php +++ /dev/null @@ -1,430 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Tests\Input; - -use Symfony\Component\Console\Input\InputDefinition; -use Symfony\Component\Console\Input\InputArgument; -use Symfony\Component\Console\Input\InputOption; - -class InputDefinitionTest extends \PHPUnit_Framework_TestCase -{ - protected static $fixtures; - - protected $foo, $bar, $foo1, $foo2; - - public static function setUpBeforeClass() - { - self::$fixtures = __DIR__.'/../Fixtures/'; - } - - public function testConstructorArguments() - { - $this->initializeArguments(); - - $definition = new InputDefinition(); - $this->assertEquals(array(), $definition->getArguments(), '__construct() creates a new InputDefinition object'); - - $definition = new InputDefinition(array($this->foo, $this->bar)); - $this->assertEquals(array('foo' => $this->foo, 'bar' => $this->bar), $definition->getArguments(), '__construct() takes an array of InputArgument objects as its first argument'); - } - - public function testConstructorOptions() - { - $this->initializeOptions(); - - $definition = new InputDefinition(); - $this->assertEquals(array(), $definition->getOptions(), '__construct() creates a new InputDefinition object'); - - $definition = new InputDefinition(array($this->foo, $this->bar)); - $this->assertEquals(array('foo' => $this->foo, 'bar' => $this->bar), $definition->getOptions(), '__construct() takes an array of InputOption objects as its first argument'); - } - - public function testSetArguments() - { - $this->initializeArguments(); - - $definition = new InputDefinition(); - $definition->setArguments(array($this->foo)); - $this->assertEquals(array('foo' => $this->foo), $definition->getArguments(), '->setArguments() sets the array of InputArgument objects'); - $definition->setArguments(array($this->bar)); - - $this->assertEquals(array('bar' => $this->bar), $definition->getArguments(), '->setArguments() clears all InputArgument objects'); - } - - public function testAddArguments() - { - $this->initializeArguments(); - - $definition = new InputDefinition(); - $definition->addArguments(array($this->foo)); - $this->assertEquals(array('foo' => $this->foo), $definition->getArguments(), '->addArguments() adds an array of InputArgument objects'); - $definition->addArguments(array($this->bar)); - $this->assertEquals(array('foo' => $this->foo, 'bar' => $this->bar), $definition->getArguments(), '->addArguments() does not clear existing InputArgument objects'); - } - - public function testAddArgument() - { - $this->initializeArguments(); - - $definition = new InputDefinition(); - $definition->addArgument($this->foo); - $this->assertEquals(array('foo' => $this->foo), $definition->getArguments(), '->addArgument() adds a InputArgument object'); - $definition->addArgument($this->bar); - $this->assertEquals(array('foo' => $this->foo, 'bar' => $this->bar), $definition->getArguments(), '->addArgument() adds a InputArgument object'); - } - - /** - * @expectedException \LogicException - * @expectedExceptionMessage An argument with name "foo" already exists. - */ - public function testArgumentsMustHaveDifferentNames() - { - $this->initializeArguments(); - - $definition = new InputDefinition(); - $definition->addArgument($this->foo); - $definition->addArgument($this->foo1); - } - - /** - * @expectedException \LogicException - * @expectedExceptionMessage Cannot add an argument after an array argument. - */ - public function testArrayArgumentHasToBeLast() - { - $this->initializeArguments(); - - $definition = new InputDefinition(); - $definition->addArgument(new InputArgument('fooarray', InputArgument::IS_ARRAY)); - $definition->addArgument(new InputArgument('anotherbar')); - } - - /** - * @expectedException \LogicException - * @expectedExceptionMessage Cannot add a required argument after an optional one. - */ - public function testRequiredArgumentCannotFollowAnOptionalOne() - { - $this->initializeArguments(); - - $definition = new InputDefinition(); - $definition->addArgument($this->foo); - $definition->addArgument($this->foo2); - } - - public function testGetArgument() - { - $this->initializeArguments(); - - $definition = new InputDefinition(); - $definition->addArguments(array($this->foo)); - $this->assertEquals($this->foo, $definition->getArgument('foo'), '->getArgument() returns a InputArgument by its name'); - } - - /** - * @expectedException \InvalidArgumentException - * @expectedExceptionMessage The "bar" argument does not exist. - */ - public function testGetInvalidArgument() - { - $this->initializeArguments(); - - $definition = new InputDefinition(); - $definition->addArguments(array($this->foo)); - $definition->getArgument('bar'); - } - - public function testHasArgument() - { - $this->initializeArguments(); - - $definition = new InputDefinition(); - $definition->addArguments(array($this->foo)); - - $this->assertTrue($definition->hasArgument('foo'), '->hasArgument() returns true if a InputArgument exists for the given name'); - $this->assertFalse($definition->hasArgument('bar'), '->hasArgument() returns false if a InputArgument exists for the given name'); - } - - public function testGetArgumentRequiredCount() - { - $this->initializeArguments(); - - $definition = new InputDefinition(); - $definition->addArgument($this->foo2); - $this->assertEquals(1, $definition->getArgumentRequiredCount(), '->getArgumentRequiredCount() returns the number of required arguments'); - $definition->addArgument($this->foo); - $this->assertEquals(1, $definition->getArgumentRequiredCount(), '->getArgumentRequiredCount() returns the number of required arguments'); - } - - public function testGetArgumentCount() - { - $this->initializeArguments(); - - $definition = new InputDefinition(); - $definition->addArgument($this->foo2); - $this->assertEquals(1, $definition->getArgumentCount(), '->getArgumentCount() returns the number of arguments'); - $definition->addArgument($this->foo); - $this->assertEquals(2, $definition->getArgumentCount(), '->getArgumentCount() returns the number of arguments'); - } - - public function testGetArgumentDefaults() - { - $definition = new InputDefinition(array( - new InputArgument('foo1', InputArgument::OPTIONAL), - new InputArgument('foo2', InputArgument::OPTIONAL, '', 'default'), - new InputArgument('foo3', InputArgument::OPTIONAL | InputArgument::IS_ARRAY), - // new InputArgument('foo4', InputArgument::OPTIONAL | InputArgument::IS_ARRAY, '', array(1, 2)), - )); - $this->assertEquals(array('foo1' => null, 'foo2' => 'default', 'foo3' => array()), $definition->getArgumentDefaults(), '->getArgumentDefaults() return the default values for each argument'); - - $definition = new InputDefinition(array( - new InputArgument('foo4', InputArgument::OPTIONAL | InputArgument::IS_ARRAY, '', array(1, 2)), - )); - $this->assertEquals(array('foo4' => array(1, 2)), $definition->getArgumentDefaults(), '->getArgumentDefaults() return the default values for each argument'); - } - - public function testSetOptions() - { - $this->initializeOptions(); - - $definition = new InputDefinition(array($this->foo)); - $this->assertEquals(array('foo' => $this->foo), $definition->getOptions(), '->setOptions() sets the array of InputOption objects'); - $definition->setOptions(array($this->bar)); - $this->assertEquals(array('bar' => $this->bar), $definition->getOptions(), '->setOptions() clears all InputOption objects'); - } - - /** - * @expectedException \InvalidArgumentException - * @expectedExceptionMessage The "-f" option does not exist. - */ - public function testSetOptionsClearsOptions() - { - $this->initializeOptions(); - - $definition = new InputDefinition(array($this->foo)); - $definition->setOptions(array($this->bar)); - $definition->getOptionForShortcut('f'); - } - - public function testAddOptions() - { - $this->initializeOptions(); - - $definition = new InputDefinition(array($this->foo)); - $this->assertEquals(array('foo' => $this->foo), $definition->getOptions(), '->addOptions() adds an array of InputOption objects'); - $definition->addOptions(array($this->bar)); - $this->assertEquals(array('foo' => $this->foo, 'bar' => $this->bar), $definition->getOptions(), '->addOptions() does not clear existing InputOption objects'); - } - - public function testAddOption() - { - $this->initializeOptions(); - - $definition = new InputDefinition(); - $definition->addOption($this->foo); - $this->assertEquals(array('foo' => $this->foo), $definition->getOptions(), '->addOption() adds a InputOption object'); - $definition->addOption($this->bar); - $this->assertEquals(array('foo' => $this->foo, 'bar' => $this->bar), $definition->getOptions(), '->addOption() adds a InputOption object'); - } - - /** - * @expectedException \LogicException - * @expectedExceptionMessage An option named "foo" already exists. - */ - public function testAddDuplicateOption() - { - $this->initializeOptions(); - - $definition = new InputDefinition(); - $definition->addOption($this->foo); - $definition->addOption($this->foo2); - } - - /** - * @expectedException \LogicException - * @expectedExceptionMessage An option with shortcut "f" already exists. - */ - public function testAddDuplicateShortcutOption() - { - $this->initializeOptions(); - - $definition = new InputDefinition(); - $definition->addOption($this->foo); - $definition->addOption($this->foo1); - } - - public function testGetOption() - { - $this->initializeOptions(); - - $definition = new InputDefinition(array($this->foo)); - $this->assertEquals($this->foo, $definition->getOption('foo'), '->getOption() returns a InputOption by its name'); - } - - /** - * @expectedException \InvalidArgumentException - * @expectedExceptionMessage The "--bar" option does not exist. - */ - public function testGetInvalidOption() - { - $this->initializeOptions(); - - $definition = new InputDefinition(array($this->foo)); - $definition->getOption('bar'); - } - - public function testHasOption() - { - $this->initializeOptions(); - - $definition = new InputDefinition(array($this->foo)); - $this->assertTrue($definition->hasOption('foo'), '->hasOption() returns true if a InputOption exists for the given name'); - $this->assertFalse($definition->hasOption('bar'), '->hasOption() returns false if a InputOption exists for the given name'); - } - - public function testHasShortcut() - { - $this->initializeOptions(); - - $definition = new InputDefinition(array($this->foo)); - $this->assertTrue($definition->hasShortcut('f'), '->hasShortcut() returns true if a InputOption exists for the given shortcut'); - $this->assertFalse($definition->hasShortcut('b'), '->hasShortcut() returns false if a InputOption exists for the given shortcut'); - } - - public function testGetOptionForShortcut() - { - $this->initializeOptions(); - - $definition = new InputDefinition(array($this->foo)); - $this->assertEquals($this->foo, $definition->getOptionForShortcut('f'), '->getOptionForShortcut() returns a InputOption by its shortcut'); - } - - public function testGetOptionForMultiShortcut() - { - $this->initializeOptions(); - - $definition = new InputDefinition(array($this->multi)); - $this->assertEquals($this->multi, $definition->getOptionForShortcut('m'), '->getOptionForShortcut() returns a InputOption by its shortcut'); - $this->assertEquals($this->multi, $definition->getOptionForShortcut('mmm'), '->getOptionForShortcut() returns a InputOption by its shortcut'); - } - - /** - * @expectedException \InvalidArgumentException - * @expectedExceptionMessage The "-l" option does not exist. - */ - public function testGetOptionForInvalidShortcut() - { - $this->initializeOptions(); - - $definition = new InputDefinition(array($this->foo)); - $definition->getOptionForShortcut('l'); - } - - public function testGetOptionDefaults() - { - $definition = new InputDefinition(array( - new InputOption('foo1', null, InputOption::VALUE_NONE), - new InputOption('foo2', null, InputOption::VALUE_REQUIRED), - new InputOption('foo3', null, InputOption::VALUE_REQUIRED, '', 'default'), - new InputOption('foo4', null, InputOption::VALUE_OPTIONAL), - new InputOption('foo5', null, InputOption::VALUE_OPTIONAL, '', 'default'), - new InputOption('foo6', null, InputOption::VALUE_OPTIONAL | InputOption::VALUE_IS_ARRAY), - new InputOption('foo7', null, InputOption::VALUE_OPTIONAL | InputOption::VALUE_IS_ARRAY, '', array(1, 2)), - )); - $defaults = array( - 'foo1' => false, - 'foo2' => null, - 'foo3' => 'default', - 'foo4' => null, - 'foo5' => 'default', - 'foo6' => array(), - 'foo7' => array(1, 2), - ); - $this->assertSame($defaults, $definition->getOptionDefaults(), '->getOptionDefaults() returns the default values for all options'); - } - - public function testGetSynopsis() - { - $definition = new InputDefinition(array(new InputOption('foo'))); - $this->assertEquals('[--foo]', $definition->getSynopsis(), '->getSynopsis() returns a synopsis of arguments and options'); - $definition = new InputDefinition(array(new InputOption('foo', 'f'))); - $this->assertEquals('[-f|--foo]', $definition->getSynopsis(), '->getSynopsis() returns a synopsis of arguments and options'); - $definition = new InputDefinition(array(new InputOption('foo', 'f', InputOption::VALUE_REQUIRED))); - $this->assertEquals('[-f|--foo="..."]', $definition->getSynopsis(), '->getSynopsis() returns a synopsis of arguments and options'); - $definition = new InputDefinition(array(new InputOption('foo', 'f', InputOption::VALUE_OPTIONAL))); - $this->assertEquals('[-f|--foo[="..."]]', $definition->getSynopsis(), '->getSynopsis() returns a synopsis of arguments and options'); - - $definition = new InputDefinition(array(new InputArgument('foo'))); - $this->assertEquals('[foo]', $definition->getSynopsis(), '->getSynopsis() returns a synopsis of arguments and options'); - $definition = new InputDefinition(array(new InputArgument('foo', InputArgument::REQUIRED))); - $this->assertEquals('foo', $definition->getSynopsis(), '->getSynopsis() returns a synopsis of arguments and options'); - $definition = new InputDefinition(array(new InputArgument('foo', InputArgument::IS_ARRAY))); - $this->assertEquals('[foo1] ... [fooN]', $definition->getSynopsis(), '->getSynopsis() returns a synopsis of arguments and options'); - $definition = new InputDefinition(array(new InputArgument('foo', InputArgument::REQUIRED | InputArgument::IS_ARRAY))); - $this->assertEquals('foo1 ... [fooN]', $definition->getSynopsis(), '->getSynopsis() returns a synopsis of arguments and options'); - } - - /** - * @group legacy - */ - public function testLegacyAsText() - { - $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED); - - $definition = new InputDefinition(array( - new InputArgument('foo', InputArgument::OPTIONAL, 'The foo argument'), - new InputArgument('baz', InputArgument::OPTIONAL, 'The baz argument', true), - new InputArgument('bar', InputArgument::OPTIONAL | InputArgument::IS_ARRAY, 'The bar argument', array('http://foo.com/')), - new InputOption('foo', 'f', InputOption::VALUE_REQUIRED, 'The foo option'), - new InputOption('baz', null, InputOption::VALUE_OPTIONAL, 'The baz option', false), - new InputOption('bar', 'b', InputOption::VALUE_OPTIONAL, 'The bar option', 'bar'), - new InputOption('qux', '', InputOption::VALUE_OPTIONAL | InputOption::VALUE_IS_ARRAY, 'The qux option', array('http://foo.com/', 'bar')), - new InputOption('qux2', '', InputOption::VALUE_OPTIONAL | InputOption::VALUE_IS_ARRAY, 'The qux2 option', array('foo' => 'bar')), - )); - $this->assertStringEqualsFile(self::$fixtures.'/definition_astext.txt', $definition->asText(), '->asText() returns a textual representation of the InputDefinition'); - } - - /** - * @group legacy - */ - public function testLegacyAsXml() - { - $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED); - - $definition = new InputDefinition(array( - new InputArgument('foo', InputArgument::OPTIONAL, 'The foo argument'), - new InputArgument('baz', InputArgument::OPTIONAL, 'The baz argument', true), - new InputArgument('bar', InputArgument::OPTIONAL | InputArgument::IS_ARRAY, 'The bar argument', array('bar')), - new InputOption('foo', 'f', InputOption::VALUE_REQUIRED, 'The foo option'), - new InputOption('baz', null, InputOption::VALUE_OPTIONAL, 'The baz option', false), - new InputOption('bar', 'b', InputOption::VALUE_OPTIONAL, 'The bar option', 'bar'), - )); - $this->assertXmlStringEqualsXmlFile(self::$fixtures.'/definition_asxml.txt', $definition->asXml(), '->asXml() returns an XML representation of the InputDefinition'); - } - - protected function initializeArguments() - { - $this->foo = new InputArgument('foo'); - $this->bar = new InputArgument('bar'); - $this->foo1 = new InputArgument('foo'); - $this->foo2 = new InputArgument('foo2', InputArgument::REQUIRED); - } - - protected function initializeOptions() - { - $this->foo = new InputOption('foo', 'f'); - $this->bar = new InputOption('bar', 'b'); - $this->foo1 = new InputOption('fooBis', 'f'); - $this->foo2 = new InputOption('foo', 'p'); - $this->multi = new InputOption('multi', 'm|mm|mmm'); - } -} diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Input/InputOptionTest.php b/vendor/symfony/console/Symfony/Component/Console/Tests/Input/InputOptionTest.php deleted file mode 100644 index 53ce1df..0000000 --- a/vendor/symfony/console/Symfony/Component/Console/Tests/Input/InputOptionTest.php +++ /dev/null @@ -1,204 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Tests\Input; - -use Symfony\Component\Console\Input\InputOption; - -class InputOptionTest extends \PHPUnit_Framework_TestCase -{ - public function testConstructor() - { - $option = new InputOption('foo'); - $this->assertEquals('foo', $option->getName(), '__construct() takes a name as its first argument'); - $option = new InputOption('--foo'); - $this->assertEquals('foo', $option->getName(), '__construct() removes the leading -- of the option name'); - } - - /** - * @expectedException \InvalidArgumentException - * @expectedExceptionMessage Impossible to have an option mode VALUE_IS_ARRAY if the option does not accept a value. - */ - public function testArrayModeWithoutValue() - { - new InputOption('foo', 'f', InputOption::VALUE_IS_ARRAY); - } - - public function testShortcut() - { - $option = new InputOption('foo', 'f'); - $this->assertEquals('f', $option->getShortcut(), '__construct() can take a shortcut as its second argument'); - $option = new InputOption('foo', '-f|-ff|fff'); - $this->assertEquals('f|ff|fff', $option->getShortcut(), '__construct() removes the leading - of the shortcuts'); - $option = new InputOption('foo', array('f', 'ff', '-fff')); - $this->assertEquals('f|ff|fff', $option->getShortcut(), '__construct() removes the leading - of the shortcuts'); - $option = new InputOption('foo'); - $this->assertNull($option->getShortcut(), '__construct() makes the shortcut null by default'); - } - - public function testModes() - { - $option = new InputOption('foo', 'f'); - $this->assertFalse($option->acceptValue(), '__construct() gives a "InputOption::VALUE_NONE" mode by default'); - $this->assertFalse($option->isValueRequired(), '__construct() gives a "InputOption::VALUE_NONE" mode by default'); - $this->assertFalse($option->isValueOptional(), '__construct() gives a "InputOption::VALUE_NONE" mode by default'); - - $option = new InputOption('foo', 'f', null); - $this->assertFalse($option->acceptValue(), '__construct() can take "InputOption::VALUE_NONE" as its mode'); - $this->assertFalse($option->isValueRequired(), '__construct() can take "InputOption::VALUE_NONE" as its mode'); - $this->assertFalse($option->isValueOptional(), '__construct() can take "InputOption::VALUE_NONE" as its mode'); - - $option = new InputOption('foo', 'f', InputOption::VALUE_NONE); - $this->assertFalse($option->acceptValue(), '__construct() can take "InputOption::VALUE_NONE" as its mode'); - $this->assertFalse($option->isValueRequired(), '__construct() can take "InputOption::VALUE_NONE" as its mode'); - $this->assertFalse($option->isValueOptional(), '__construct() can take "InputOption::VALUE_NONE" as its mode'); - - $option = new InputOption('foo', 'f', InputOption::VALUE_REQUIRED); - $this->assertTrue($option->acceptValue(), '__construct() can take "InputOption::VALUE_REQUIRED" as its mode'); - $this->assertTrue($option->isValueRequired(), '__construct() can take "InputOption::VALUE_REQUIRED" as its mode'); - $this->assertFalse($option->isValueOptional(), '__construct() can take "InputOption::VALUE_REQUIRED" as its mode'); - - $option = new InputOption('foo', 'f', InputOption::VALUE_OPTIONAL); - $this->assertTrue($option->acceptValue(), '__construct() can take "InputOption::VALUE_OPTIONAL" as its mode'); - $this->assertFalse($option->isValueRequired(), '__construct() can take "InputOption::VALUE_OPTIONAL" as its mode'); - $this->assertTrue($option->isValueOptional(), '__construct() can take "InputOption::VALUE_OPTIONAL" as its mode'); - } - - /** - * @dataProvider provideInvalidModes - */ - public function testInvalidModes($mode) - { - $this->setExpectedException('InvalidArgumentException', sprintf('Option mode "%s" is not valid.', $mode)); - - new InputOption('foo', 'f', $mode); - } - - public function provideInvalidModes() - { - return array( - array('ANOTHER_ONE'), - array(-1), - ); - } - - /** - * @expectedException \InvalidArgumentException - */ - public function testEmptyNameIsInvalid() - { - new InputOption(''); - } - - /** - * @expectedException \InvalidArgumentException - */ - public function testDoubleDashNameIsInvalid() - { - new InputOption('--'); - } - - /** - * @expectedException \InvalidArgumentException - */ - public function testSingleDashOptionIsInvalid() - { - new InputOption('foo', '-'); - } - - public function testIsArray() - { - $option = new InputOption('foo', null, InputOption::VALUE_OPTIONAL | InputOption::VALUE_IS_ARRAY); - $this->assertTrue($option->isArray(), '->isArray() returns true if the option can be an array'); - $option = new InputOption('foo', null, InputOption::VALUE_NONE); - $this->assertFalse($option->isArray(), '->isArray() returns false if the option can not be an array'); - } - - public function testGetDescription() - { - $option = new InputOption('foo', 'f', null, 'Some description'); - $this->assertEquals('Some description', $option->getDescription(), '->getDescription() returns the description message'); - } - - public function testGetDefault() - { - $option = new InputOption('foo', null, InputOption::VALUE_OPTIONAL, '', 'default'); - $this->assertEquals('default', $option->getDefault(), '->getDefault() returns the default value'); - - $option = new InputOption('foo', null, InputOption::VALUE_REQUIRED, '', 'default'); - $this->assertEquals('default', $option->getDefault(), '->getDefault() returns the default value'); - - $option = new InputOption('foo', null, InputOption::VALUE_REQUIRED); - $this->assertNull($option->getDefault(), '->getDefault() returns null if no default value is configured'); - - $option = new InputOption('foo', null, InputOption::VALUE_OPTIONAL | InputOption::VALUE_IS_ARRAY); - $this->assertEquals(array(), $option->getDefault(), '->getDefault() returns an empty array if option is an array'); - - $option = new InputOption('foo', null, InputOption::VALUE_NONE); - $this->assertFalse($option->getDefault(), '->getDefault() returns false if the option does not take a value'); - } - - public function testSetDefault() - { - $option = new InputOption('foo', null, InputOption::VALUE_REQUIRED, '', 'default'); - $option->setDefault(null); - $this->assertNull($option->getDefault(), '->setDefault() can reset the default value by passing null'); - $option->setDefault('another'); - $this->assertEquals('another', $option->getDefault(), '->setDefault() changes the default value'); - - $option = new InputOption('foo', null, InputOption::VALUE_REQUIRED | InputOption::VALUE_IS_ARRAY); - $option->setDefault(array(1, 2)); - $this->assertEquals(array(1, 2), $option->getDefault(), '->setDefault() changes the default value'); - } - - /** - * @expectedException \LogicException - * @expectedExceptionMessage Cannot set a default value when using InputOption::VALUE_NONE mode. - */ - public function testDefaultValueWithValueNoneMode() - { - $option = new InputOption('foo', 'f', InputOption::VALUE_NONE); - $option->setDefault('default'); - } - - /** - * @expectedException \LogicException - * @expectedExceptionMessage A default value for an array option must be an array. - */ - public function testDefaultValueWithIsArrayMode() - { - $option = new InputOption('foo', 'f', InputOption::VALUE_OPTIONAL | InputOption::VALUE_IS_ARRAY); - $option->setDefault('default'); - } - - public function testEquals() - { - $option = new InputOption('foo', 'f', null, 'Some description'); - $option2 = new InputOption('foo', 'f', null, 'Alternative description'); - $this->assertTrue($option->equals($option2)); - - $option = new InputOption('foo', 'f', InputOption::VALUE_OPTIONAL, 'Some description'); - $option2 = new InputOption('foo', 'f', InputOption::VALUE_OPTIONAL, 'Some description', true); - $this->assertFalse($option->equals($option2)); - - $option = new InputOption('foo', 'f', null, 'Some description'); - $option2 = new InputOption('bar', 'f', null, 'Some description'); - $this->assertFalse($option->equals($option2)); - - $option = new InputOption('foo', 'f', null, 'Some description'); - $option2 = new InputOption('foo', '', null, 'Some description'); - $this->assertFalse($option->equals($option2)); - - $option = new InputOption('foo', 'f', null, 'Some description'); - $option2 = new InputOption('foo', 'f', InputOption::VALUE_OPTIONAL, 'Some description'); - $this->assertFalse($option->equals($option2)); - } -} diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Input/InputTest.php b/vendor/symfony/console/Symfony/Component/Console/Tests/Input/InputTest.php deleted file mode 100644 index 0b3e38f..0000000 --- a/vendor/symfony/console/Symfony/Component/Console/Tests/Input/InputTest.php +++ /dev/null @@ -1,121 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Tests\Input; - -use Symfony\Component\Console\Input\ArrayInput; -use Symfony\Component\Console\Input\InputDefinition; -use Symfony\Component\Console\Input\InputArgument; -use Symfony\Component\Console\Input\InputOption; - -class InputTest extends \PHPUnit_Framework_TestCase -{ - public function testConstructor() - { - $input = new ArrayInput(array('name' => 'foo'), new InputDefinition(array(new InputArgument('name')))); - $this->assertEquals('foo', $input->getArgument('name'), '->__construct() takes a InputDefinition as an argument'); - } - - public function testOptions() - { - $input = new ArrayInput(array('--name' => 'foo'), new InputDefinition(array(new InputOption('name')))); - $this->assertEquals('foo', $input->getOption('name'), '->getOption() returns the value for the given option'); - - $input->setOption('name', 'bar'); - $this->assertEquals('bar', $input->getOption('name'), '->setOption() sets the value for a given option'); - $this->assertEquals(array('name' => 'bar'), $input->getOptions(), '->getOptions() returns all option values'); - - $input = new ArrayInput(array('--name' => 'foo'), new InputDefinition(array(new InputOption('name'), new InputOption('bar', '', InputOption::VALUE_OPTIONAL, '', 'default')))); - $this->assertEquals('default', $input->getOption('bar'), '->getOption() returns the default value for optional options'); - $this->assertEquals(array('name' => 'foo', 'bar' => 'default'), $input->getOptions(), '->getOptions() returns all option values, even optional ones'); - } - - /** - * @expectedException \InvalidArgumentException - * @expectedExceptionMessage The "foo" option does not exist. - */ - public function testSetInvalidOption() - { - $input = new ArrayInput(array('--name' => 'foo'), new InputDefinition(array(new InputOption('name'), new InputOption('bar', '', InputOption::VALUE_OPTIONAL, '', 'default')))); - $input->setOption('foo', 'bar'); - } - - /** - * @expectedException \InvalidArgumentException - * @expectedExceptionMessage The "foo" option does not exist. - */ - public function testGetInvalidOption() - { - $input = new ArrayInput(array('--name' => 'foo'), new InputDefinition(array(new InputOption('name'), new InputOption('bar', '', InputOption::VALUE_OPTIONAL, '', 'default')))); - $input->getOption('foo'); - } - - public function testArguments() - { - $input = new ArrayInput(array('name' => 'foo'), new InputDefinition(array(new InputArgument('name')))); - $this->assertEquals('foo', $input->getArgument('name'), '->getArgument() returns the value for the given argument'); - - $input->setArgument('name', 'bar'); - $this->assertEquals('bar', $input->getArgument('name'), '->setArgument() sets the value for a given argument'); - $this->assertEquals(array('name' => 'bar'), $input->getArguments(), '->getArguments() returns all argument values'); - - $input = new ArrayInput(array('name' => 'foo'), new InputDefinition(array(new InputArgument('name'), new InputArgument('bar', InputArgument::OPTIONAL, '', 'default')))); - $this->assertEquals('default', $input->getArgument('bar'), '->getArgument() returns the default value for optional arguments'); - $this->assertEquals(array('name' => 'foo', 'bar' => 'default'), $input->getArguments(), '->getArguments() returns all argument values, even optional ones'); - } - - /** - * @expectedException \InvalidArgumentException - * @expectedExceptionMessage The "foo" argument does not exist. - */ - public function testSetInvalidArgument() - { - $input = new ArrayInput(array('name' => 'foo'), new InputDefinition(array(new InputArgument('name'), new InputArgument('bar', InputArgument::OPTIONAL, '', 'default')))); - $input->setArgument('foo', 'bar'); - } - - /** - * @expectedException \InvalidArgumentException - * @expectedExceptionMessage The "foo" argument does not exist. - */ - public function testGetInvalidArgument() - { - $input = new ArrayInput(array('name' => 'foo'), new InputDefinition(array(new InputArgument('name'), new InputArgument('bar', InputArgument::OPTIONAL, '', 'default')))); - $input->getArgument('foo'); - } - - /** - * @expectedException \RuntimeException - * @expectedExceptionMessage Not enough arguments. - */ - public function testValidateWithMissingArguments() - { - $input = new ArrayInput(array()); - $input->bind(new InputDefinition(array(new InputArgument('name', InputArgument::REQUIRED)))); - $input->validate(); - } - - public function testValidate() - { - $input = new ArrayInput(array('name' => 'foo')); - $input->bind(new InputDefinition(array(new InputArgument('name', InputArgument::REQUIRED)))); - - $this->assertNull($input->validate()); - } - - public function testSetGetInteractive() - { - $input = new ArrayInput(array()); - $this->assertTrue($input->isInteractive(), '->isInteractive() returns whether the input should be interactive or not'); - $input->setInteractive(false); - $this->assertFalse($input->isInteractive(), '->setInteractive() changes the interactive flag'); - } -} diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Input/StringInputTest.php b/vendor/symfony/console/Symfony/Component/Console/Tests/Input/StringInputTest.php deleted file mode 100644 index 575d527..0000000 --- a/vendor/symfony/console/Symfony/Component/Console/Tests/Input/StringInputTest.php +++ /dev/null @@ -1,101 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Tests\Input; - -use Symfony\Component\Console\Input\InputDefinition; -use Symfony\Component\Console\Input\InputOption; -use Symfony\Component\Console\Input\StringInput; - -class StringInputTest extends \PHPUnit_Framework_TestCase -{ - /** - * @dataProvider getTokenizeData - */ - public function testTokenize($input, $tokens, $message) - { - $input = new StringInput($input); - $r = new \ReflectionClass('Symfony\Component\Console\Input\ArgvInput'); - $p = $r->getProperty('tokens'); - $p->setAccessible(true); - $this->assertEquals($tokens, $p->getValue($input), $message); - } - - public function testInputOptionWithGivenString() - { - $definition = new InputDefinition( - array(new InputOption('foo', null, InputOption::VALUE_REQUIRED)) - ); - - // call to bind - $input = new StringInput('--foo=bar'); - $input->bind($definition); - $this->assertEquals('bar', $input->getOption('foo')); - } - - /** - * @group legacy - */ - public function testLegacyInputOptionDefinitionInConstructor() - { - $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED); - - $definition = new InputDefinition( - array(new InputOption('foo', null, InputOption::VALUE_REQUIRED)) - ); - - $input = new StringInput('--foo=bar', $definition); - $this->assertEquals('bar', $input->getOption('foo')); - } - - public function getTokenizeData() - { - return array( - array('', array(), '->tokenize() parses an empty string'), - array('foo', array('foo'), '->tokenize() parses arguments'), - array(' foo bar ', array('foo', 'bar'), '->tokenize() ignores whitespaces between arguments'), - array('"quoted"', array('quoted'), '->tokenize() parses quoted arguments'), - array("'quoted'", array('quoted'), '->tokenize() parses quoted arguments'), - array("'a\rb\nc\td'", array("a\rb\nc\td"), '->tokenize() parses whitespace chars in strings'), - array("'a'\r'b'\n'c'\t'd'", array('a','b','c','d'), '->tokenize() parses whitespace chars between args as spaces'), - array('\"quoted\"', array('"quoted"'), '->tokenize() parses escaped-quoted arguments'), - array("\'quoted\'", array('\'quoted\''), '->tokenize() parses escaped-quoted arguments'), - array('-a', array('-a'), '->tokenize() parses short options'), - array('-azc', array('-azc'), '->tokenize() parses aggregated short options'), - array('-awithavalue', array('-awithavalue'), '->tokenize() parses short options with a value'), - array('-a"foo bar"', array('-afoo bar'), '->tokenize() parses short options with a value'), - array('-a"foo bar""foo bar"', array('-afoo barfoo bar'), '->tokenize() parses short options with a value'), - array('-a\'foo bar\'', array('-afoo bar'), '->tokenize() parses short options with a value'), - array('-a\'foo bar\'\'foo bar\'', array('-afoo barfoo bar'), '->tokenize() parses short options with a value'), - array('-a\'foo bar\'"foo bar"', array('-afoo barfoo bar'), '->tokenize() parses short options with a value'), - array('--long-option', array('--long-option'), '->tokenize() parses long options'), - array('--long-option=foo', array('--long-option=foo'), '->tokenize() parses long options with a value'), - array('--long-option="foo bar"', array('--long-option=foo bar'), '->tokenize() parses long options with a value'), - array('--long-option="foo bar""another"', array('--long-option=foo baranother'), '->tokenize() parses long options with a value'), - array('--long-option=\'foo bar\'', array('--long-option=foo bar'), '->tokenize() parses long options with a value'), - array("--long-option='foo bar''another'", array('--long-option=foo baranother'), '->tokenize() parses long options with a value'), - array("--long-option='foo bar'\"another\"", array('--long-option=foo baranother'), '->tokenize() parses long options with a value'), - array('foo -a -ffoo --long bar', array('foo', '-a', '-ffoo', '--long', 'bar'), '->tokenize() parses when several arguments and options'), - ); - } - - public function testToString() - { - $input = new StringInput('-f foo'); - $this->assertEquals('-f foo', (string) $input); - - $input = new StringInput('-f --bar=foo "a b c d"'); - $this->assertEquals('-f --bar=foo '.escapeshellarg('a b c d'), (string) $input); - - $input = new StringInput('-f --bar=foo \'a b c d\' '."'A\nB\\'C'"); - $this->assertEquals('-f --bar=foo '.escapeshellarg('a b c d').' '.escapeshellarg("A\nB'C"), (string) $input); - } -} diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Logger/ConsoleLoggerTest.php b/vendor/symfony/console/Symfony/Component/Console/Tests/Logger/ConsoleLoggerTest.php deleted file mode 100644 index 1abc363..0000000 --- a/vendor/symfony/console/Symfony/Component/Console/Tests/Logger/ConsoleLoggerTest.php +++ /dev/null @@ -1,58 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Tests\Logger; - -use Psr\Log\Test\LoggerInterfaceTest; -use Psr\Log\LogLevel; -use Symfony\Component\Console\Logger\ConsoleLogger; -use Symfony\Component\Console\Tests\Fixtures\DummyOutput; -use Symfony\Component\Console\Output\OutputInterface; - -/** - * Console logger test - * - * @author Kévin Dunglas <dunglas@gmail.com> - */ -class ConsoleLoggerTest extends LoggerInterfaceTest -{ - /** - * @var DummyOutput - */ - protected $output; - - /** - * {@inheritdoc} - */ - public function getLogger() - { - $this->output = new DummyOutput(OutputInterface::VERBOSITY_VERBOSE); - - return new ConsoleLogger($this->output, array( - LogLevel::EMERGENCY => OutputInterface::VERBOSITY_NORMAL, - LogLevel::ALERT => OutputInterface::VERBOSITY_NORMAL, - LogLevel::CRITICAL => OutputInterface::VERBOSITY_NORMAL, - LogLevel::ERROR => OutputInterface::VERBOSITY_NORMAL, - LogLevel::WARNING => OutputInterface::VERBOSITY_NORMAL, - LogLevel::NOTICE => OutputInterface::VERBOSITY_NORMAL, - LogLevel::INFO => OutputInterface::VERBOSITY_NORMAL, - LogLevel::DEBUG => OutputInterface::VERBOSITY_NORMAL, - )); - } - - /** - * {@inheritdoc} - */ - public function getLogs() - { - return $this->output->getLogs(); - } -} diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Output/ConsoleOutputTest.php b/vendor/symfony/console/Symfony/Component/Console/Tests/Output/ConsoleOutputTest.php deleted file mode 100644 index 1afbbb6..0000000 --- a/vendor/symfony/console/Symfony/Component/Console/Tests/Output/ConsoleOutputTest.php +++ /dev/null @@ -1,25 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Tests\Output; - -use Symfony\Component\Console\Output\ConsoleOutput; -use Symfony\Component\Console\Output\Output; - -class ConsoleOutputTest extends \PHPUnit_Framework_TestCase -{ - public function testConstructor() - { - $output = new ConsoleOutput(Output::VERBOSITY_QUIET, true); - $this->assertEquals(Output::VERBOSITY_QUIET, $output->getVerbosity(), '__construct() takes the verbosity as its first argument'); - $this->assertSame($output->getFormatter(), $output->getErrorOutput()->getFormatter(), '__construct() takes a formatter or null as the third argument'); - } -} diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Output/NullOutputTest.php b/vendor/symfony/console/Symfony/Component/Console/Tests/Output/NullOutputTest.php deleted file mode 100644 index b20ae4e..0000000 --- a/vendor/symfony/console/Symfony/Component/Console/Tests/Output/NullOutputTest.php +++ /dev/null @@ -1,39 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Tests\Output; - -use Symfony\Component\Console\Output\NullOutput; -use Symfony\Component\Console\Output\OutputInterface; - -class NullOutputTest extends \PHPUnit_Framework_TestCase -{ - public function testConstructor() - { - $output = new NullOutput(); - - ob_start(); - $output->write('foo'); - $buffer = ob_get_clean(); - - $this->assertSame('', $buffer, '->write() does nothing (at least nothing is printed)'); - $this->assertFalse($output->isDecorated(), '->isDecorated() returns false'); - } - - public function testVerbosity() - { - $output = new NullOutput(); - $this->assertSame(OutputInterface::VERBOSITY_QUIET, $output->getVerbosity(), '->getVerbosity() returns VERBOSITY_QUIET for NullOutput by default'); - - $output->setVerbosity(OutputInterface::VERBOSITY_VERBOSE); - $this->assertSame(OutputInterface::VERBOSITY_QUIET, $output->getVerbosity(), '->getVerbosity() always returns VERBOSITY_QUIET for NullOutput'); - } -} diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Output/OutputTest.php b/vendor/symfony/console/Symfony/Component/Console/Tests/Output/OutputTest.php deleted file mode 100644 index cfb4afe..0000000 --- a/vendor/symfony/console/Symfony/Component/Console/Tests/Output/OutputTest.php +++ /dev/null @@ -1,156 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Tests\Output; - -use Symfony\Component\Console\Output\Output; -use Symfony\Component\Console\Formatter\OutputFormatterStyle; - -class OutputTest extends \PHPUnit_Framework_TestCase -{ - public function testConstructor() - { - $output = new TestOutput(Output::VERBOSITY_QUIET, true); - $this->assertEquals(Output::VERBOSITY_QUIET, $output->getVerbosity(), '__construct() takes the verbosity as its first argument'); - $this->assertTrue($output->isDecorated(), '__construct() takes the decorated flag as its second argument'); - } - - public function testSetIsDecorated() - { - $output = new TestOutput(); - $output->setDecorated(true); - $this->assertTrue($output->isDecorated(), 'setDecorated() sets the decorated flag'); - } - - public function testSetGetVerbosity() - { - $output = new TestOutput(); - $output->setVerbosity(Output::VERBOSITY_QUIET); - $this->assertEquals(Output::VERBOSITY_QUIET, $output->getVerbosity(), '->setVerbosity() sets the verbosity'); - - $this->assertTrue($output->isQuiet()); - $this->assertFalse($output->isVerbose()); - $this->assertFalse($output->isVeryVerbose()); - $this->assertFalse($output->isDebug()); - - $output->setVerbosity(Output::VERBOSITY_NORMAL); - $this->assertFalse($output->isQuiet()); - $this->assertFalse($output->isVerbose()); - $this->assertFalse($output->isVeryVerbose()); - $this->assertFalse($output->isDebug()); - - $output->setVerbosity(Output::VERBOSITY_VERBOSE); - $this->assertFalse($output->isQuiet()); - $this->assertTrue($output->isVerbose()); - $this->assertFalse($output->isVeryVerbose()); - $this->assertFalse($output->isDebug()); - - $output->setVerbosity(Output::VERBOSITY_VERY_VERBOSE); - $this->assertFalse($output->isQuiet()); - $this->assertTrue($output->isVerbose()); - $this->assertTrue($output->isVeryVerbose()); - $this->assertFalse($output->isDebug()); - - $output->setVerbosity(Output::VERBOSITY_DEBUG); - $this->assertFalse($output->isQuiet()); - $this->assertTrue($output->isVerbose()); - $this->assertTrue($output->isVeryVerbose()); - $this->assertTrue($output->isDebug()); - } - - public function testWriteWithVerbosityQuiet() - { - $output = new TestOutput(Output::VERBOSITY_QUIET); - $output->writeln('foo'); - $this->assertEquals('', $output->output, '->writeln() outputs nothing if verbosity is set to VERBOSITY_QUIET'); - } - - public function testWriteAnArrayOfMessages() - { - $output = new TestOutput(); - $output->writeln(array('foo', 'bar')); - $this->assertEquals("foo\nbar\n", $output->output, '->writeln() can take an array of messages to output'); - } - - /** - * @dataProvider provideWriteArguments - */ - public function testWriteRawMessage($message, $type, $expectedOutput) - { - $output = new TestOutput(); - $output->writeln($message, $type); - $this->assertEquals($expectedOutput, $output->output); - } - - public function provideWriteArguments() - { - return array( - array('<info>foo</info>', Output::OUTPUT_RAW, "<info>foo</info>\n"), - array('<info>foo</info>', Output::OUTPUT_PLAIN, "foo\n"), - ); - } - - public function testWriteWithDecorationTurnedOff() - { - $output = new TestOutput(); - $output->setDecorated(false); - $output->writeln('<info>foo</info>'); - $this->assertEquals("foo\n", $output->output, '->writeln() strips decoration tags if decoration is set to false'); - } - - public function testWriteDecoratedMessage() - { - $fooStyle = new OutputFormatterStyle('yellow', 'red', array('blink')); - $output = new TestOutput(); - $output->getFormatter()->setStyle('FOO', $fooStyle); - $output->setDecorated(true); - $output->writeln('<foo>foo</foo>'); - $this->assertEquals("\033[33;41;5mfoo\033[39;49;25m\n", $output->output, '->writeln() decorates the output'); - } - - /** - * @expectedException \InvalidArgumentException - * @expectedExceptionMessage Unknown output type given (24) - */ - public function testWriteWithInvalidOutputType() - { - $output = new TestOutput(); - $output->writeln('<foo>foo</foo>', 24); - } - - public function testWriteWithInvalidStyle() - { - $output = new TestOutput(); - - $output->clear(); - $output->write('<bar>foo</bar>'); - $this->assertEquals('<bar>foo</bar>', $output->output, '->write() do nothing when a style does not exist'); - - $output->clear(); - $output->writeln('<bar>foo</bar>'); - $this->assertEquals("<bar>foo</bar>\n", $output->output, '->writeln() do nothing when a style does not exist'); - } -} - -class TestOutput extends Output -{ - public $output = ''; - - public function clear() - { - $this->output = ''; - } - - protected function doWrite($message, $newline) - { - $this->output .= $message.($newline ? "\n" : ''); - } -} diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Output/StreamOutputTest.php b/vendor/symfony/console/Symfony/Component/Console/Tests/Output/StreamOutputTest.php deleted file mode 100644 index 2fd4f61..0000000 --- a/vendor/symfony/console/Symfony/Component/Console/Tests/Output/StreamOutputTest.php +++ /dev/null @@ -1,60 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Tests\Output; - -use Symfony\Component\Console\Output\Output; -use Symfony\Component\Console\Output\StreamOutput; - -class StreamOutputTest extends \PHPUnit_Framework_TestCase -{ - protected $stream; - - protected function setUp() - { - $this->stream = fopen('php://memory', 'a', false); - } - - protected function tearDown() - { - $this->stream = null; - } - - public function testConstructor() - { - $output = new StreamOutput($this->stream, Output::VERBOSITY_QUIET, true); - $this->assertEquals(Output::VERBOSITY_QUIET, $output->getVerbosity(), '__construct() takes the verbosity as its first argument'); - $this->assertTrue($output->isDecorated(), '__construct() takes the decorated flag as its second argument'); - } - - /** - * @expectedException \InvalidArgumentException - * @expectedExceptionMessage The StreamOutput class needs a stream as its first argument. - */ - public function testStreamIsRequired() - { - new StreamOutput('foo'); - } - - public function testGetStream() - { - $output = new StreamOutput($this->stream); - $this->assertEquals($this->stream, $output->getStream(), '->getStream() returns the current stream'); - } - - public function testDoWrite() - { - $output = new StreamOutput($this->stream); - $output->writeln('foo'); - rewind($output->getStream()); - $this->assertEquals('foo'.PHP_EOL, stream_get_contents($output->getStream()), '->doWrite() writes to the stream'); - } -} diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Tester/ApplicationTesterTest.php b/vendor/symfony/console/Symfony/Component/Console/Tests/Tester/ApplicationTesterTest.php deleted file mode 100644 index a8389dd..0000000 --- a/vendor/symfony/console/Symfony/Component/Console/Tests/Tester/ApplicationTesterTest.php +++ /dev/null @@ -1,69 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Tests\Tester; - -use Symfony\Component\Console\Application; -use Symfony\Component\Console\Output\Output; -use Symfony\Component\Console\Tester\ApplicationTester; - -class ApplicationTesterTest extends \PHPUnit_Framework_TestCase -{ - protected $application; - protected $tester; - - protected function setUp() - { - $this->application = new Application(); - $this->application->setAutoExit(false); - $this->application->register('foo') - ->addArgument('foo') - ->setCode(function ($input, $output) { $output->writeln('foo'); }) - ; - - $this->tester = new ApplicationTester($this->application); - $this->tester->run(array('command' => 'foo', 'foo' => 'bar'), array('interactive' => false, 'decorated' => false, 'verbosity' => Output::VERBOSITY_VERBOSE)); - } - - protected function tearDown() - { - $this->application = null; - $this->tester = null; - } - - public function testRun() - { - $this->assertFalse($this->tester->getInput()->isInteractive(), '->execute() takes an interactive option'); - $this->assertFalse($this->tester->getOutput()->isDecorated(), '->execute() takes a decorated option'); - $this->assertEquals(Output::VERBOSITY_VERBOSE, $this->tester->getOutput()->getVerbosity(), '->execute() takes a verbosity option'); - } - - public function testGetInput() - { - $this->assertEquals('bar', $this->tester->getInput()->getArgument('foo'), '->getInput() returns the current input instance'); - } - - public function testGetOutput() - { - rewind($this->tester->getOutput()->getStream()); - $this->assertEquals('foo'.PHP_EOL, stream_get_contents($this->tester->getOutput()->getStream()), '->getOutput() returns the current output instance'); - } - - public function testGetDisplay() - { - $this->assertEquals('foo'.PHP_EOL, $this->tester->getDisplay(), '->getDisplay() returns the display of the last execution'); - } - - public function testGetStatusCode() - { - $this->assertSame(0, $this->tester->getStatusCode(), '->getStatusCode() returns the status code'); - } -} diff --git a/vendor/symfony/console/Symfony/Component/Console/Tests/Tester/CommandTesterTest.php b/vendor/symfony/console/Symfony/Component/Console/Tests/Tester/CommandTesterTest.php deleted file mode 100644 index b54c00e..0000000 --- a/vendor/symfony/console/Symfony/Component/Console/Tests/Tester/CommandTesterTest.php +++ /dev/null @@ -1,84 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Tests\Tester; - -use Symfony\Component\Console\Application; -use Symfony\Component\Console\Command\Command; -use Symfony\Component\Console\Output\Output; -use Symfony\Component\Console\Tester\CommandTester; - -class CommandTesterTest extends \PHPUnit_Framework_TestCase -{ - protected $command; - protected $tester; - - protected function setUp() - { - $this->command = new Command('foo'); - $this->command->addArgument('command'); - $this->command->addArgument('foo'); - $this->command->setCode(function ($input, $output) { $output->writeln('foo'); }); - - $this->tester = new CommandTester($this->command); - $this->tester->execute(array('foo' => 'bar'), array('interactive' => false, 'decorated' => false, 'verbosity' => Output::VERBOSITY_VERBOSE)); - } - - protected function tearDown() - { - $this->command = null; - $this->tester = null; - } - - public function testExecute() - { - $this->assertFalse($this->tester->getInput()->isInteractive(), '->execute() takes an interactive option'); - $this->assertFalse($this->tester->getOutput()->isDecorated(), '->execute() takes a decorated option'); - $this->assertEquals(Output::VERBOSITY_VERBOSE, $this->tester->getOutput()->getVerbosity(), '->execute() takes a verbosity option'); - } - - public function testGetInput() - { - $this->assertEquals('bar', $this->tester->getInput()->getArgument('foo'), '->getInput() returns the current input instance'); - } - - public function testGetOutput() - { - rewind($this->tester->getOutput()->getStream()); - $this->assertEquals('foo'.PHP_EOL, stream_get_contents($this->tester->getOutput()->getStream()), '->getOutput() returns the current output instance'); - } - - public function testGetDisplay() - { - $this->assertEquals('foo'.PHP_EOL, $this->tester->getDisplay(), '->getDisplay() returns the display of the last execution'); - } - - public function testGetStatusCode() - { - $this->assertSame(0, $this->tester->getStatusCode(), '->getStatusCode() returns the status code'); - } - - public function testCommandFromApplication() - { - $application = new Application(); - $application->setAutoExit(false); - - $command = new Command('foo'); - $command->setCode(function ($input, $output) { $output->writeln('foo'); }); - - $application->add($command); - - $tester = new CommandTester($application->find('foo')); - - // check that there is no need to pass the command name here - $this->assertEquals(0, $tester->execute(array())); - } -} |
