You are here

public function ArgvInputTest::testConstructor 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::testConstructor()

File

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

Class

ArgvInputTest

Namespace

Symfony\Component\Console\Tests\Input

Code

public function testConstructor() {
  $_SERVER['argv'] = array(
    'cli.php',
    'foo',
  );
  $input = new ArgvInput();
  $r = new \ReflectionObject($input);
  $p = $r
    ->getProperty('tokens');
  $p
    ->setAccessible(true);
  $this
    ->assertEquals(array(
    'foo',
  ), $p
    ->getValue($input), '__construct() automatically get its input from the argv server variable');
}