Upgrade 1-11.38

This commit is contained in:
xesmyd
2026-03-30 14:10:30 +02:00
parent f2a7e6d1fc
commit ac648ef29d
24665 changed files with 69682 additions and 2205004 deletions
+12 -18
View File
@@ -38,22 +38,12 @@ class InputArgumentTest extends TestCase
}
/**
* @dataProvider provideInvalidModes
* @expectedException \InvalidArgumentException
* @expectedExceptionMessage Argument mode "-1" is not valid.
*/
public function testInvalidModes($mode)
public function testInvalidModes()
{
$this->expectException('InvalidArgumentException');
$this->expectExceptionMessage(sprintf('Argument mode "%s" is not valid.', $mode));
new InputArgument('foo', $mode);
}
public function provideInvalidModes()
{
return [
['ANOTHER_ONE'],
[-1],
];
new InputArgument('foo', '-1');
}
public function testIsArray()
@@ -91,18 +81,22 @@ class InputArgumentTest extends TestCase
$this->assertEquals([1, 2], $argument->getDefault(), '->setDefault() changes the default value');
}
/**
* @expectedException \LogicException
* @expectedExceptionMessage Cannot set a default value except for InputArgument::OPTIONAL mode.
*/
public function testSetDefaultWithRequiredArgument()
{
$this->expectException('LogicException');
$this->expectExceptionMessage('Cannot set a default value except for InputArgument::OPTIONAL mode.');
$argument = new InputArgument('foo', InputArgument::REQUIRED);
$argument->setDefault('default');
}
/**
* @expectedException \LogicException
* @expectedExceptionMessage A default value for an array argument must be an array.
*/
public function testSetDefaultWithArrayArgument()
{
$this->expectException('LogicException');
$this->expectExceptionMessage('A default value for an array argument must be an array.');
$argument = new InputArgument('foo', InputArgument::IS_ARRAY);
$argument->setDefault('default');
}