Kanboard requires at least PHP 5.6 now
This commit is contained in:
@@ -11,15 +11,19 @@
|
||||
|
||||
namespace Symfony\Component\Console\Tests\Input;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Symfony\Component\Console\Input\InputDefinition;
|
||||
use Symfony\Component\Console\Input\InputArgument;
|
||||
use Symfony\Component\Console\Input\InputOption;
|
||||
|
||||
class InputDefinitionTest extends \PHPUnit_Framework_TestCase
|
||||
class InputDefinitionTest extends TestCase
|
||||
{
|
||||
protected static $fixtures;
|
||||
|
||||
protected $foo, $bar, $foo1, $foo2;
|
||||
protected $foo;
|
||||
protected $bar;
|
||||
protected $foo1;
|
||||
protected $foo2;
|
||||
|
||||
public static function setUpBeforeClass()
|
||||
{
|
||||
@@ -383,41 +387,6 @@ class InputDefinitionTest extends \PHPUnit_Framework_TestCase
|
||||
$this->assertEquals('[options] [--] [<cat>]', $definition->getSynopsis(true), '->getSynopsis(true) groups options in [options]');
|
||||
}
|
||||
|
||||
/**
|
||||
* @group legacy
|
||||
*/
|
||||
public function testLegacyAsText()
|
||||
{
|
||||
$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()
|
||||
{
|
||||
$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');
|
||||
|
||||
Reference in New Issue
Block a user