public function ArrayInputTest::testGetFirstArgument in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/console/Tests/Input/ArrayInputTest.php \Symfony\Component\Console\Tests\Input\ArrayInputTest::testGetFirstArgument()
File
- vendor/
symfony/ console/ Tests/ Input/ ArrayInputTest.php, line 21
Class
Namespace
Symfony\Component\Console\Tests\InputCode
public function testGetFirstArgument() {
$input = new ArrayInput(array());
$this
->assertNull($input
->getFirstArgument(), '->getFirstArgument() returns null if no argument were passed');
$input = new ArrayInput(array(
'name' => 'Fabien',
));
$this
->assertEquals('Fabien', $input
->getFirstArgument(), '->getFirstArgument() returns the first passed argument');
$input = new ArrayInput(array(
'--foo' => 'bar',
'name' => 'Fabien',
));
$this
->assertEquals('Fabien', $input
->getFirstArgument(), '->getFirstArgument() returns the first passed argument');
}