mirror of
https://gitlab.com/TheGamecraft/c-cms.git
synced 2026-04-25 12:19:11 -04:00
ALPHA 3.0.2a
This commit is contained in:
12
vendor/symfony/console/Tests/ApplicationTest.php
vendored
12
vendor/symfony/console/Tests/ApplicationTest.php
vendored
@@ -16,24 +16,24 @@ use Symfony\Component\Console\Application;
|
||||
use Symfony\Component\Console\Command\Command;
|
||||
use Symfony\Component\Console\CommandLoader\FactoryCommandLoader;
|
||||
use Symfony\Component\Console\DependencyInjection\AddConsoleCommandPass;
|
||||
use Symfony\Component\Console\Event\ConsoleCommandEvent;
|
||||
use Symfony\Component\Console\Event\ConsoleErrorEvent;
|
||||
use Symfony\Component\Console\Event\ConsoleTerminateEvent;
|
||||
use Symfony\Component\Console\Exception\CommandNotFoundException;
|
||||
use Symfony\Component\Console\Exception\NamespaceNotFoundException;
|
||||
use Symfony\Component\Console\Helper\HelperSet;
|
||||
use Symfony\Component\Console\Helper\FormatterHelper;
|
||||
use Symfony\Component\Console\Helper\HelperSet;
|
||||
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\InputInterface;
|
||||
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\ConsoleErrorEvent;
|
||||
use Symfony\Component\Console\Event\ConsoleTerminateEvent;
|
||||
use Symfony\Component\Console\Exception\CommandNotFoundException;
|
||||
use Symfony\Component\DependencyInjection\ContainerBuilder;
|
||||
use Symfony\Component\EventDispatcher\EventDispatcher;
|
||||
|
||||
|
||||
@@ -12,16 +12,16 @@
|
||||
namespace Symfony\Component\Console\Tests\Command;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Symfony\Component\Console\Application;
|
||||
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\InputDefinition;
|
||||
use Symfony\Component\Console\Input\InputInterface;
|
||||
use Symfony\Component\Console\Input\InputOption;
|
||||
use Symfony\Component\Console\Input\StringInput;
|
||||
use Symfony\Component\Console\Output\OutputInterface;
|
||||
use Symfony\Component\Console\Output\NullOutput;
|
||||
use Symfony\Component\Console\Output\OutputInterface;
|
||||
use Symfony\Component\Console\Tester\CommandTester;
|
||||
|
||||
class CommandTest extends TestCase
|
||||
@@ -340,7 +340,7 @@ class CommandTest extends TestCase
|
||||
$command->setApplication(new Application());
|
||||
$command->setProcessTitle('foo');
|
||||
$this->assertSame(0, $command->run(new StringInput(''), new NullOutput()));
|
||||
if (function_exists('cli_set_process_title')) {
|
||||
if (\function_exists('cli_set_process_title')) {
|
||||
if (null === @cli_get_process_title() && 'Darwin' === PHP_OS) {
|
||||
$this->markTestSkipped('Running "cli_get_process_title" as an unprivileged user is not supported on MacOS.');
|
||||
}
|
||||
|
||||
@@ -12,10 +12,10 @@
|
||||
namespace Symfony\Component\Console\Tests\Command;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Symfony\Component\Console\Tester\CommandTester;
|
||||
use Symfony\Component\Console\Application;
|
||||
use Symfony\Component\Console\Command\HelpCommand;
|
||||
use Symfony\Component\Console\Command\ListCommand;
|
||||
use Symfony\Component\Console\Application;
|
||||
use Symfony\Component\Console\Tester\CommandTester;
|
||||
|
||||
class HelpCommandTest extends TestCase
|
||||
{
|
||||
|
||||
@@ -12,8 +12,8 @@
|
||||
namespace Symfony\Component\Console\Tests\Command;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Symfony\Component\Console\Tester\CommandTester;
|
||||
use Symfony\Component\Console\Application;
|
||||
use Symfony\Component\Console\Tester\CommandTester;
|
||||
|
||||
class ListCommandTest extends TestCase
|
||||
{
|
||||
|
||||
@@ -20,8 +20,8 @@ use Symfony\Component\Console\EventListener\ErrorListener;
|
||||
use Symfony\Component\Console\Input\ArgvInput;
|
||||
use Symfony\Component\Console\Input\ArrayInput;
|
||||
use Symfony\Component\Console\Input\Input;
|
||||
use Symfony\Component\Console\Input\StringInput;
|
||||
use Symfony\Component\Console\Input\InputInterface;
|
||||
use Symfony\Component\Console\Input\StringInput;
|
||||
use Symfony\Component\Console\Output\OutputInterface;
|
||||
|
||||
class ErrorListenerTest extends TestCase
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<?php
|
||||
|
||||
use Symfony\Component\Console\Helper\TableCell;
|
||||
use Symfony\Component\Console\Input\InputInterface;
|
||||
use Symfony\Component\Console\Output\OutputInterface;
|
||||
use Symfony\Component\Console\Style\SymfonyStyle;
|
||||
use Symfony\Component\Console\Helper\TableCell;
|
||||
|
||||
//Ensure formatting tables when using multiple headers with TableCell
|
||||
return function (InputInterface $input, OutputInterface $output) {
|
||||
|
||||
@@ -12,8 +12,8 @@
|
||||
namespace Symfony\Component\Console\Tests\Formatter;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Symfony\Component\Console\Formatter\OutputFormatterStyleStack;
|
||||
use Symfony\Component\Console\Formatter\OutputFormatterStyle;
|
||||
use Symfony\Component\Console\Formatter\OutputFormatterStyleStack;
|
||||
|
||||
class OutputFormatterStyleStackTest extends TestCase
|
||||
{
|
||||
|
||||
@@ -12,8 +12,8 @@
|
||||
namespace Symfony\Component\Console\Tests\Helper;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Symfony\Component\Console\Helper\HelperSet;
|
||||
use Symfony\Component\Console\Command\Command;
|
||||
use Symfony\Component\Console\Helper\HelperSet;
|
||||
|
||||
class HelperSetTest extends TestCase
|
||||
{
|
||||
|
||||
@@ -14,8 +14,8 @@ namespace Symfony\Component\Console\Tests\Helper;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Symfony\Component\Console\Helper\DebugFormatterHelper;
|
||||
use Symfony\Component\Console\Helper\HelperSet;
|
||||
use Symfony\Component\Console\Output\StreamOutput;
|
||||
use Symfony\Component\Console\Helper\ProcessHelper;
|
||||
use Symfony\Component\Console\Output\StreamOutput;
|
||||
use Symfony\Component\Process\Process;
|
||||
|
||||
class ProcessHelperTest extends TestCase
|
||||
|
||||
@@ -13,8 +13,8 @@ namespace Symfony\Component\Console\Tests\Helper;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Symfony\Component\Console\Formatter\OutputFormatter;
|
||||
use Symfony\Component\Console\Helper\ProgressBar;
|
||||
use Symfony\Component\Console\Helper\Helper;
|
||||
use Symfony\Component\Console\Helper\ProgressBar;
|
||||
use Symfony\Component\Console\Output\ConsoleSectionOutput;
|
||||
use Symfony\Component\Console\Output\StreamOutput;
|
||||
|
||||
|
||||
@@ -12,9 +12,9 @@
|
||||
namespace Symfony\Component\Console\Tests\Helper;
|
||||
|
||||
use Symfony\Component\Console\Formatter\OutputFormatter;
|
||||
use Symfony\Component\Console\Helper\QuestionHelper;
|
||||
use Symfony\Component\Console\Helper\HelperSet;
|
||||
use Symfony\Component\Console\Helper\FormatterHelper;
|
||||
use Symfony\Component\Console\Helper\HelperSet;
|
||||
use Symfony\Component\Console\Helper\QuestionHelper;
|
||||
use Symfony\Component\Console\Output\StreamOutput;
|
||||
use Symfony\Component\Console\Question\ChoiceQuestion;
|
||||
use Symfony\Component\Console\Question\ConfirmationQuestion;
|
||||
@@ -221,7 +221,7 @@ class QuestionHelperTest extends AbstractQuestionHelperTest
|
||||
|
||||
public function testAskHiddenResponse()
|
||||
{
|
||||
if ('\\' === DIRECTORY_SEPARATOR) {
|
||||
if ('\\' === \DIRECTORY_SEPARATOR) {
|
||||
$this->markTestSkipped('This test is not supported on Windows');
|
||||
}
|
||||
|
||||
@@ -276,7 +276,7 @@ class QuestionHelperTest extends AbstractQuestionHelperTest
|
||||
|
||||
$error = 'This is not a color!';
|
||||
$validator = function ($color) use ($error) {
|
||||
if (!in_array($color, array('white', 'black'))) {
|
||||
if (!\in_array($color, array('white', 'black'))) {
|
||||
throw new \InvalidArgumentException($error);
|
||||
}
|
||||
|
||||
|
||||
@@ -6,8 +6,8 @@ use Symfony\Component\Console\Helper\FormatterHelper;
|
||||
use Symfony\Component\Console\Helper\HelperSet;
|
||||
use Symfony\Component\Console\Helper\SymfonyQuestionHelper;
|
||||
use Symfony\Component\Console\Output\StreamOutput;
|
||||
use Symfony\Component\Console\Question\Question;
|
||||
use Symfony\Component\Console\Question\ChoiceQuestion;
|
||||
use Symfony\Component\Console\Question\Question;
|
||||
|
||||
/**
|
||||
* @group tty
|
||||
|
||||
@@ -14,9 +14,9 @@ namespace Symfony\Component\Console\Tests\Helper;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Symfony\Component\Console\Formatter\OutputFormatter;
|
||||
use Symfony\Component\Console\Helper\Table;
|
||||
use Symfony\Component\Console\Helper\TableStyle;
|
||||
use Symfony\Component\Console\Helper\TableSeparator;
|
||||
use Symfony\Component\Console\Helper\TableCell;
|
||||
use Symfony\Component\Console\Helper\TableSeparator;
|
||||
use Symfony\Component\Console\Helper\TableStyle;
|
||||
use Symfony\Component\Console\Output\ConsoleSectionOutput;
|
||||
use Symfony\Component\Console\Output\StreamOutput;
|
||||
|
||||
|
||||
@@ -13,8 +13,8 @@ namespace Symfony\Component\Console\Tests\Input;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Symfony\Component\Console\Input\ArgvInput;
|
||||
use Symfony\Component\Console\Input\InputDefinition;
|
||||
use Symfony\Component\Console\Input\InputArgument;
|
||||
use Symfony\Component\Console\Input\InputDefinition;
|
||||
use Symfony\Component\Console\Input\InputOption;
|
||||
|
||||
class ArgvInputTest extends TestCase
|
||||
@@ -395,25 +395,26 @@ class ArgvInputTest extends TestCase
|
||||
/**
|
||||
* @dataProvider provideGetParameterOptionValues
|
||||
*/
|
||||
public function testGetParameterOptionEqualSign($argv, $key, $onlyParams, $expected)
|
||||
public function testGetParameterOptionEqualSign($argv, $key, $default, $onlyParams, $expected)
|
||||
{
|
||||
$input = new ArgvInput($argv);
|
||||
$this->assertEquals($expected, $input->getParameterOption($key, false, $onlyParams), '->getParameterOption() returns the expected value');
|
||||
$this->assertEquals($expected, $input->getParameterOption($key, $default, $onlyParams), '->getParameterOption() returns the expected value');
|
||||
}
|
||||
|
||||
public function provideGetParameterOptionValues()
|
||||
{
|
||||
return array(
|
||||
array(array('app/console', 'foo:bar', '-e', 'dev'), '-e', false, 'dev'),
|
||||
array(array('app/console', 'foo:bar', '--env=dev'), '--env', false, 'dev'),
|
||||
array(array('app/console', 'foo:bar', '-e', 'dev'), array('-e', '--env'), false, 'dev'),
|
||||
array(array('app/console', 'foo:bar', '--env=dev'), array('-e', '--env'), false, 'dev'),
|
||||
array(array('app/console', 'foo:bar', '--env=dev', '--en=1'), array('--en'), false, '1'),
|
||||
array(array('app/console', 'foo:bar', '--env=dev', '', '--en=1'), array('--en'), false, '1'),
|
||||
array(array('app/console', 'foo:bar', '--env', 'val'), '--env', false, 'val'),
|
||||
array(array('app/console', 'foo:bar', '--env', 'val', '--dummy'), '--env', false, 'val'),
|
||||
array(array('app/console', 'foo:bar', '--', '--env=dev'), '--env', false, 'dev'),
|
||||
array(array('app/console', 'foo:bar', '--', '--env=dev'), '--env', true, false),
|
||||
array(array('app/console', 'foo:bar'), '-e', 'default', false, 'default'),
|
||||
array(array('app/console', 'foo:bar', '-e', 'dev'), '-e', 'default', false, 'dev'),
|
||||
array(array('app/console', 'foo:bar', '--env=dev'), '--env', 'default', false, 'dev'),
|
||||
array(array('app/console', 'foo:bar', '-e', 'dev'), array('-e', '--env'), 'default', false, 'dev'),
|
||||
array(array('app/console', 'foo:bar', '--env=dev'), array('-e', '--env'), 'default', false, 'dev'),
|
||||
array(array('app/console', 'foo:bar', '--env=dev', '--en=1'), array('--en'), 'default', false, '1'),
|
||||
array(array('app/console', 'foo:bar', '--env=dev', '', '--en=1'), array('--en'), 'default', false, '1'),
|
||||
array(array('app/console', 'foo:bar', '--env', 'val'), '--env', 'default', false, 'val'),
|
||||
array(array('app/console', 'foo:bar', '--env', 'val', '--dummy'), '--env', 'default', false, 'val'),
|
||||
array(array('app/console', 'foo:bar', '--', '--env=dev'), '--env', 'default', false, 'dev'),
|
||||
array(array('app/console', 'foo:bar', '--', '--env=dev'), '--env', 'default', true, 'default'),
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -13,8 +13,8 @@ namespace Symfony\Component\Console\Tests\Input;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Symfony\Component\Console\Input\ArrayInput;
|
||||
use Symfony\Component\Console\Input\InputDefinition;
|
||||
use Symfony\Component\Console\Input\InputArgument;
|
||||
use Symfony\Component\Console\Input\InputDefinition;
|
||||
use Symfony\Component\Console\Input\InputOption;
|
||||
|
||||
class ArrayInputTest extends TestCase
|
||||
@@ -47,14 +47,14 @@ class ArrayInputTest extends TestCase
|
||||
{
|
||||
$input = new ArrayInput(array('name' => 'Fabien', '--foo' => 'bar'));
|
||||
$this->assertEquals('bar', $input->getParameterOption('--foo'), '->getParameterOption() returns the option of specified name');
|
||||
$this->assertFalse($input->getParameterOption('--bar'), '->getParameterOption() returns the default if an option is not present in the passed parameters');
|
||||
$this->assertEquals('default', $input->getParameterOption('--bar', 'default'), '->getParameterOption() returns the default value if an option is not present in the passed parameters');
|
||||
|
||||
$input = new ArrayInput(array('Fabien', '--foo' => 'bar'));
|
||||
$this->assertEquals('bar', $input->getParameterOption('--foo'), '->getParameterOption() returns the option of specified name');
|
||||
|
||||
$input = new ArrayInput(array('--foo', '--', '--bar' => 'woop'));
|
||||
$this->assertEquals('woop', $input->getParameterOption('--bar'), '->getParameterOption() returns the correct value if an option is present in the passed parameters');
|
||||
$this->assertFalse($input->getParameterOption('--bar', false, true), '->getParameterOption() returns false if an option is present in the passed parameters after an end of options signal');
|
||||
$this->assertEquals('default', $input->getParameterOption('--bar', 'default', true), '->getParameterOption() returns the default value if an option is present in the passed parameters after an end of options signal');
|
||||
}
|
||||
|
||||
public function testParseArguments()
|
||||
|
||||
@@ -12,8 +12,8 @@
|
||||
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\InputDefinition;
|
||||
use Symfony\Component\Console\Input\InputOption;
|
||||
|
||||
class InputDefinitionTest extends TestCase
|
||||
|
||||
@@ -13,8 +13,8 @@ namespace Symfony\Component\Console\Tests\Input;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Symfony\Component\Console\Input\ArrayInput;
|
||||
use Symfony\Component\Console\Input\InputDefinition;
|
||||
use Symfony\Component\Console\Input\InputArgument;
|
||||
use Symfony\Component\Console\Input\InputDefinition;
|
||||
use Symfony\Component\Console\Input\InputOption;
|
||||
|
||||
class InputTest extends TestCase
|
||||
|
||||
@@ -16,8 +16,8 @@ use Psr\Log\LoggerInterface;
|
||||
use Psr\Log\LogLevel;
|
||||
use Symfony\Component\Console\Logger\ConsoleLogger;
|
||||
use Symfony\Component\Console\Output\BufferedOutput;
|
||||
use Symfony\Component\Console\Tests\Fixtures\DummyOutput;
|
||||
use Symfony\Component\Console\Output\OutputInterface;
|
||||
use Symfony\Component\Console\Tests\Fixtures\DummyOutput;
|
||||
|
||||
/**
|
||||
* Console logger test.
|
||||
|
||||
@@ -12,8 +12,8 @@
|
||||
namespace Symfony\Component\Console\Tests\Output;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Symfony\Component\Console\Output\Output;
|
||||
use Symfony\Component\Console\Formatter\OutputFormatterStyle;
|
||||
use Symfony\Component\Console\Output\Output;
|
||||
|
||||
class OutputTest extends TestCase
|
||||
{
|
||||
|
||||
@@ -13,12 +13,12 @@ namespace Symfony\Component\Console\Tests\Style;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Symfony\Component\Console\Command\Command;
|
||||
use Symfony\Component\Console\Tester\CommandTester;
|
||||
use Symfony\Component\Console\Formatter\OutputFormatter;
|
||||
use Symfony\Component\Console\Output\OutputInterface;
|
||||
use Symfony\Component\Console\Output\ConsoleOutputInterface;
|
||||
use Symfony\Component\Console\Input\InputInterface;
|
||||
use Symfony\Component\Console\Output\ConsoleOutputInterface;
|
||||
use Symfony\Component\Console\Output\OutputInterface;
|
||||
use Symfony\Component\Console\Style\SymfonyStyle;
|
||||
use Symfony\Component\Console\Tester\CommandTester;
|
||||
|
||||
class SymfonyStyleTest extends TestCase
|
||||
{
|
||||
|
||||
@@ -14,12 +14,12 @@ namespace Symfony\Component\Console\Tests\Tester;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Symfony\Component\Console\Application;
|
||||
use Symfony\Component\Console\Command\Command;
|
||||
use Symfony\Component\Console\Output\Output;
|
||||
use Symfony\Component\Console\Tester\CommandTester;
|
||||
use Symfony\Component\Console\Question\Question;
|
||||
use Symfony\Component\Console\Helper\HelperSet;
|
||||
use Symfony\Component\Console\Helper\QuestionHelper;
|
||||
use Symfony\Component\Console\Output\Output;
|
||||
use Symfony\Component\Console\Question\Question;
|
||||
use Symfony\Component\Console\Style\SymfonyStyle;
|
||||
use Symfony\Component\Console\Tester\CommandTester;
|
||||
|
||||
class CommandTesterTest extends TestCase
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user