You are here

public function InputArgumentTest::testIsArray in Zircon Profile 8

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

File

vendor/symfony/console/Tests/Input/InputArgumentTest.php, line 57

Class

InputArgumentTest

Namespace

Symfony\Component\Console\Tests\Input

Code

public function testIsArray() {
  $argument = new InputArgument('foo', InputArgument::IS_ARRAY);
  $this
    ->assertTrue($argument
    ->isArray(), '->isArray() returns true if the argument can be an array');
  $argument = new InputArgument('foo', InputArgument::OPTIONAL | InputArgument::IS_ARRAY);
  $this
    ->assertTrue($argument
    ->isArray(), '->isArray() returns true if the argument can be an array');
  $argument = new InputArgument('foo', InputArgument::OPTIONAL);
  $this
    ->assertFalse($argument
    ->isArray(), '->isArray() returns false if the argument can not be an array');
}