public function ArgvInputTest::testHasParameterOption 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::testHasParameterOption()
File
- vendor/
symfony/ console/ Tests/ Input/ ArgvInputTest.php, line 266
Class
Namespace
Symfony\Component\Console\Tests\InputCode
public function testHasParameterOption() {
$input = new ArgvInput(array(
'cli.php',
'-f',
'foo',
));
$this
->assertTrue($input
->hasParameterOption('-f'), '->hasParameterOption() returns true if the given short option is in the raw input');
$input = new ArgvInput(array(
'cli.php',
'--foo',
'foo',
));
$this
->assertTrue($input
->hasParameterOption('--foo'), '->hasParameterOption() returns true if the given short option is in the raw input');
$input = new ArgvInput(array(
'cli.php',
'foo',
));
$this
->assertFalse($input
->hasParameterOption('--foo'), '->hasParameterOption() returns false if the given short option is not in the raw input');
$input = new ArgvInput(array(
'cli.php',
'--foo=bar',
));
$this
->assertTrue($input
->hasParameterOption('--foo'), '->hasParameterOption() returns true if the given option with provided value is in the raw input');
}