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
+21 -43
View File
@@ -23,65 +23,55 @@ class PropertyPathTest extends TestCase
$this->assertEquals('reference.traversable[index].property', $path->__toString());
}
/**
* @expectedException \Symfony\Component\PropertyAccess\Exception\InvalidPropertyPathException
*/
public function testDotIsRequiredBeforeProperty()
{
$this->expectException('Symfony\Component\PropertyAccess\Exception\InvalidPropertyPathException');
new PropertyPath('[index]property');
}
/**
* @expectedException \Symfony\Component\PropertyAccess\Exception\InvalidPropertyPathException
*/
public function testDotCannotBePresentAtTheBeginning()
{
$this->expectException('Symfony\Component\PropertyAccess\Exception\InvalidPropertyPathException');
new PropertyPath('.property');
}
public function providePathsContainingUnexpectedCharacters()
{
return array(
array('property.'),
array('property.['),
array('property..'),
array('property['),
array('property[['),
array('property[.'),
array('property[]'),
);
return [
['property.'],
['property.['],
['property..'],
['property['],
['property[['],
['property[.'],
['property[]'],
];
}
/**
* @dataProvider providePathsContainingUnexpectedCharacters
* @expectedException \Symfony\Component\PropertyAccess\Exception\InvalidPropertyPathException
*/
public function testUnexpectedCharacters($path)
{
$this->expectException('Symfony\Component\PropertyAccess\Exception\InvalidPropertyPathException');
new PropertyPath($path);
}
/**
* @expectedException \Symfony\Component\PropertyAccess\Exception\InvalidPropertyPathException
*/
public function testPathCannotBeEmpty()
{
$this->expectException('Symfony\Component\PropertyAccess\Exception\InvalidPropertyPathException');
new PropertyPath('');
}
/**
* @expectedException \Symfony\Component\PropertyAccess\Exception\InvalidArgumentException
*/
public function testPathCannotBeNull()
{
$this->expectException('Symfony\Component\PropertyAccess\Exception\InvalidArgumentException');
new PropertyPath(null);
}
/**
* @expectedException \Symfony\Component\PropertyAccess\Exception\InvalidArgumentException
*/
public function testPathCannotBeFalse()
{
$this->expectException('Symfony\Component\PropertyAccess\Exception\InvalidArgumentException');
new PropertyPath(false);
}
@@ -128,21 +118,17 @@ class PropertyPathTest extends TestCase
$this->assertEquals('child', $propertyPath->getElement(2));
}
/**
* @expectedException \OutOfBoundsException
*/
public function testGetElementDoesNotAcceptInvalidIndices()
{
$this->expectException('OutOfBoundsException');
$propertyPath = new PropertyPath('grandpa.parent[child]');
$propertyPath->getElement(3);
}
/**
* @expectedException \OutOfBoundsException
*/
public function testGetElementDoesNotAcceptNegativeIndices()
{
$this->expectException('OutOfBoundsException');
$propertyPath = new PropertyPath('grandpa.parent[child]');
$propertyPath->getElement(-1);
@@ -156,21 +142,17 @@ class PropertyPathTest extends TestCase
$this->assertFalse($propertyPath->isProperty(2));
}
/**
* @expectedException \OutOfBoundsException
*/
public function testIsPropertyDoesNotAcceptInvalidIndices()
{
$this->expectException('OutOfBoundsException');
$propertyPath = new PropertyPath('grandpa.parent[child]');
$propertyPath->isProperty(3);
}
/**
* @expectedException \OutOfBoundsException
*/
public function testIsPropertyDoesNotAcceptNegativeIndices()
{
$this->expectException('OutOfBoundsException');
$propertyPath = new PropertyPath('grandpa.parent[child]');
$propertyPath->isProperty(-1);
@@ -184,21 +166,17 @@ class PropertyPathTest extends TestCase
$this->assertTrue($propertyPath->isIndex(2));
}
/**
* @expectedException \OutOfBoundsException
*/
public function testIsIndexDoesNotAcceptInvalidIndices()
{
$this->expectException('OutOfBoundsException');
$propertyPath = new PropertyPath('grandpa.parent[child]');
$propertyPath->isIndex(3);
}
/**
* @expectedException \OutOfBoundsException
*/
public function testIsIndexDoesNotAcceptNegativeIndices()
{
$this->expectException('OutOfBoundsException');
$propertyPath = new PropertyPath('grandpa.parent[child]');
$propertyPath->isIndex(-1);