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