You are here

public function ArgvInputTest::testGetFirstArgument in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/console/Tests/Input/ArgvInputTest.php \Symfony\Component\Console\Tests\Input\ArgvInputTest::testGetFirstArgument()

File

vendor/symfony/console/Tests/Input/ArgvInputTest.php, line 257

Class

ArgvInputTest

Namespace

Symfony\Component\Console\Tests\Input

Code

public function testGetFirstArgument() {
  $input = new ArgvInput(array(
    'cli.php',
    '-fbbar',
  ));
  $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');
}