Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge branch '2.1' into 2.2

* 2.1:
  Options small typo
  [Console] fixed unparsed StringInput tokens
  [TwigBridge] fixed trans twig extractor
  [DomCrawler] fix handling of schemes by Link::getUri()
  [Console] Fixed comment
  [TwigBridge] fixed the translator extractor that were not trimming the text in trans tags (closes #7056)
  Fixed handling absent href attribute in base tag
  added a DebuClassLoader::findFile() method to make the wrapping less invasive
  fixed CHANGELOG
  bumped Symfony version to 2.1.9-DEV
  updated VERSION for 2.1.8
  updated CHANGELOG for 2.1.8
  StringInput resets the given options.

Conflicts:
	src/Symfony/Component/HttpKernel/Kernel.php
  • Loading branch information...
commit 5e29412917f06523987bda63b7bf12dd54161ab6 2 parents fdb2d93 + a811ca7
@fabpot fabpot authored
View
1  Input/ArgvInput.php
@@ -68,6 +68,7 @@ public function __construct(array $argv = null, InputDefinition $definition = nu
protected function setTokens(array $tokens)
{
$this->tokens = $tokens;
+ $this->parse();
}
/**
View
4 Output/Output.php
@@ -123,7 +123,7 @@ public function getVerbosity()
/**
* Writes a message to the output and adds a newline at the end.
*
- * @param string|array $messages The message as an array of lines of a single string
+ * @param string|array $messages The message as an array of lines or a single string
* @param integer $type The type of output
*
* @api
@@ -136,7 +136,7 @@ public function writeln($messages, $type = 0)
/**
* Writes a message to the output.
*
- * @param string|array $messages The message as an array of lines of a single string
+ * @param string|array $messages The message as an array of lines or a single string
* @param Boolean $newline Whether to add a newline or not
* @param integer $type The type of output
*
View
2  Output/OutputInterface.php
@@ -33,7 +33,7 @@
/**
* Writes a message to the output.
*
- * @param string|array $messages The message as an array of lines of a single string
+ * @param string|array $messages The message as an array of lines or a single string
* @param Boolean $newline Whether to add a newline or not
* @param integer $type The type of output (0: normal, 1: raw, 2: plain)
*
View
14 Tests/Input/StringInputTest.php
@@ -12,6 +12,8 @@
namespace Symfony\Component\Console\Tests\Input;
use Symfony\Component\Console\Input\StringInput;
+use Symfony\Component\Console\Input\InputDefinition;
+use Symfony\Component\Console\Input\InputOption;
class StringInputTest extends \PHPUnit_Framework_TestCase
{
@@ -27,6 +29,18 @@ public function testTokenize($input, $tokens, $message)
$this->assertEquals($tokens, $p->getValue($input), $message);
}
+ public function testInputOptionWithGivenString()
+ {
+ $definition = new InputDefinition(
+ array(new InputOption('foo', null, InputOption::VALUE_REQUIRED))
+ );
+
+ $input = new StringInput('--foo=bar', $definition);
+ $actual = $input->getOption('foo');
+
+ $this->assertEquals('bar', $actual);
+ }
+
public function getTokenizeData()
{
return array(
Please sign in to comment.
Something went wrong with that request. Please try again.