minor #13755 [Console] assertion for ArgvInput::getFirstArgument() with no arguments (nanocom)

This PR was merged into the 2.3 branch.

Discussion
----------

[Console] assertion for ArgvInput::getFirstArgument() with no arguments

| Q             | A
| ------------- | ---
| Bug fix?      | [no]
| New feature?  | [no]
| BC breaks?    | [no]
| Deprecations? | [no]
| Tests pass?   | [yes]
| License       | MIT

Commits
-------

11b2a9b [Console] explicit assertion for ArgvInput::getFirstArgument() with no arguments
This commit is contained in:
Fabien Potencier 2015-02-23 12:51:48 +01:00
commit c0dcbed7a5
1 changed files with 1 additions and 1 deletions

View File

@ -257,7 +257,7 @@ class ArgvInputTest extends \PHPUnit_Framework_TestCase
public function testGetFirstArgument()
{
$input = new ArgvInput(array('cli.php', '-fbbar'));
$this->assertEquals('', $input->getFirstArgument(), '->getFirstArgument() returns the first argument from the raw input');
$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');