public function ArgvInputTest::testConstructor in Zircon Profile 8
Same name and namespace in other branches
- 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
Namespace
Symfony\Component\Console\Tests\InputCode
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');
}