'foo6' =>
[],
'foo7' =>
[1, 2
],
];
$this->
assertSame($defaults,
$definition->
getOptionDefaults(), '->getOptionDefaults() returns the default values for all options'
);
} /**
* @dataProvider getGetSynopsisData
*/
public function testGetSynopsis(InputDefinition
$definition,
$expectedSynopsis,
$message = null
) { $this->
assertEquals($expectedSynopsis,
$definition->
getSynopsis(),
$message ? '->getSynopsis() '.
$message : ''
);
} public static function getGetSynopsisData() { return [ [new InputDefinition([new InputOption('foo'
)]), '[--foo]', 'puts optional options in square brackets'
],
[new InputDefinition([new InputOption('foo', 'f'
)]), '[-f|--foo]', 'separates shortcut with a pipe'
],
[new InputDefinition([new InputOption('foo', 'f', InputOption::VALUE_REQUIRED
)]), '[-f|--foo FOO]', 'uses shortcut as value placeholder'
],
[new InputDefinition([new InputOption('foo', 'f', InputOption::VALUE_OPTIONAL
)]), '[-f|--foo [FOO]]', 'puts optional values in square brackets'
],
[new InputDefinition([new InputArgument('foo', InputArgument::REQUIRED
)]), '<foo>', 'puts arguments in angle brackets'
],
[