public function InputArgumentTest::testModes in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/console/Tests/Input/InputArgumentTest.php \Symfony\Component\Console\Tests\Input\InputArgumentTest::testModes()
File
- vendor/
symfony/ console/ Tests/ Input/ InputArgumentTest.php, line 24
Class
Namespace
Symfony\Component\Console\Tests\InputCode
public function testModes() {
$argument = new InputArgument('foo');
$this
->assertFalse($argument
->isRequired(), '__construct() gives a "InputArgument::OPTIONAL" mode by default');
$argument = new InputArgument('foo', null);
$this
->assertFalse($argument
->isRequired(), '__construct() can take "InputArgument::OPTIONAL" as its mode');
$argument = new InputArgument('foo', InputArgument::OPTIONAL);
$this
->assertFalse($argument
->isRequired(), '__construct() can take "InputArgument::OPTIONAL" as its mode');
$argument = new InputArgument('foo', InputArgument::REQUIRED);
$this
->assertTrue($argument
->isRequired(), '__construct() can take "InputArgument::REQUIRED" as its mode');
}