Skip to content

Commit 019a5ff

Browse files
OskarStarknicolas-grekas
authored andcommitted
Migrate to static data providers using rector/rector
1 parent 64165df commit 019a5ff

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

Tests/PropertyAccessorTest.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ protected function setUp(): void
5555
$this->propertyAccessor = new PropertyAccessor();
5656
}
5757

58-
public function getPathsWithUnexpectedType()
58+
public static function getPathsWithUnexpectedType()
5959
{
6060
return [
6161
['', 'foobar'],
@@ -69,7 +69,7 @@ public function getPathsWithUnexpectedType()
6969
];
7070
}
7171

72-
public function getPathsWithMissingProperty()
72+
public static function getPathsWithMissingProperty()
7373
{
7474
return [
7575
[(object) ['firstName' => 'Bernhard'], 'lastName'],
@@ -89,7 +89,7 @@ public function getPathsWithMissingProperty()
8989
];
9090
}
9191

92-
public function getPathsWithMissingIndex()
92+
public static function getPathsWithMissingIndex()
9393
{
9494
return [
9595
[['firstName' => 'Bernhard'], '[lastName]'],
@@ -660,7 +660,7 @@ public function testIsWritableReturnsFalseIfNotObjectOrArray($objectOrArray, $pa
660660
$this->assertFalse($this->propertyAccessor->isWritable($objectOrArray, $path));
661661
}
662662

663-
public function getValidPropertyPaths()
663+
public static function getValidPropertyPaths()
664664
{
665665
return [
666666
[['Bernhard', 'Schussek'], '[0]', 'Bernhard'],
@@ -723,7 +723,7 @@ public function testSetValueDeepWithMagicGetter()
723723
$this->assertSame('Updated', $obj->publicProperty['foo']['bar']);
724724
}
725725

726-
public function getReferenceChainObjectsForSetValue()
726+
public static function getReferenceChainObjectsForSetValue()
727727
{
728728
return [
729729
[['a' => ['b' => ['c' => 'old-value']]], '[a][b][c]', 'new-value'],
@@ -744,7 +744,7 @@ public function testSetValueForReferenceChainIssue($object, $path, $value)
744744
$this->assertEquals($value, $this->propertyAccessor->getValue($object, $path));
745745
}
746746

747-
public function getReferenceChainObjectsForIsWritable()
747+
public static function getReferenceChainObjectsForIsWritable()
748748
{
749749
return [
750750
[new TestClassIsWritable(['a' => ['b' => 'old-value']]), 'value[a][b]', false],

Tests/PropertyPathBuilderTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ public function testReplaceDoesNotAllowInvalidOffsets($offset)
194194
$this->builder->replace($offset, 1, new PropertyPath('new1[new2].new3'));
195195
}
196196

197-
public function provideInvalidOffsets()
197+
public static function provideInvalidOffsets()
198198
{
199199
return [
200200
[6],

Tests/PropertyPathTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public function testDotCannotBePresentAtTheBeginning()
3737
new PropertyPath('.property');
3838
}
3939

40-
public function providePathsContainingUnexpectedCharacters()
40+
public static function providePathsContainingUnexpectedCharacters()
4141
{
4242
return [
4343
['property.'],

0 commit comments

Comments
 (0)