public function InputOptionTest::testEquals in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/console/Tests/Input/InputOptionTest.php \Symfony\Component\Console\Tests\Input\InputOptionTest::testEquals()
File
- vendor/
symfony/ console/ Tests/ Input/ InputOptionTest.php, line 182
Class
Namespace
Symfony\Component\Console\Tests\InputCode
public function testEquals() {
$option = new InputOption('foo', 'f', null, 'Some description');
$option2 = new InputOption('foo', 'f', null, 'Alternative description');
$this
->assertTrue($option
->equals($option2));
$option = new InputOption('foo', 'f', InputOption::VALUE_OPTIONAL, 'Some description');
$option2 = new InputOption('foo', 'f', InputOption::VALUE_OPTIONAL, 'Some description', true);
$this
->assertFalse($option
->equals($option2));
$option = new InputOption('foo', 'f', null, 'Some description');
$option2 = new InputOption('bar', 'f', null, 'Some description');
$this
->assertFalse($option
->equals($option2));
$option = new InputOption('foo', 'f', null, 'Some description');
$option2 = new InputOption('foo', '', null, 'Some description');
$this
->assertFalse($option
->equals($option2));
$option = new InputOption('foo', 'f', null, 'Some description');
$option2 = new InputOption('foo', 'f', InputOption::VALUE_OPTIONAL, 'Some description');
$this
->assertFalse($option
->equals($option2));
}