File tree Expand file tree Collapse file tree 1 file changed +18
-14
lines changed
src/Symfony/Component/PropertyAccess/Tests Expand file tree Collapse file tree 1 file changed +18
-14
lines changed Original file line number Diff line number Diff line change @@ -1001,20 +1001,6 @@ public function testGetValueGetterThrowsExceptionIfUninitializedWithoutLazyGhost
1001
1001
$ this ->propertyAccessor ->getValue (new UninitializedObjectProperty (), 'privateUninitialized ' );
1002
1002
}
1003
1003
1004
- private function createUninitializedObjectPropertyGhost (): UninitializedObjectProperty
1005
- {
1006
- $ class = 'UninitializedObjectPropertyGhost ' ;
1007
-
1008
- if (!class_exists ($ class )) {
1009
- eval ('class ' .$ class .ProxyHelper::generateLazyGhost (new \ReflectionClass (UninitializedObjectProperty::class)));
1010
- }
1011
-
1012
- $ this ->assertTrue (class_exists ($ class ));
1013
-
1014
- return $ class ::createLazyGhost (initializer: function ($ instance ) {
1015
- });
1016
- }
1017
-
1018
1004
public function testGetValuePropertyThrowsExceptionIfUninitializedWithLazyGhost ()
1019
1005
{
1020
1006
$ this ->expectException (UninitializedPropertyException::class);
@@ -1034,4 +1020,22 @@ public function testGetValueGetterThrowsExceptionIfUninitializedWithLazyGhost()
1034
1020
1035
1021
$ this ->propertyAccessor ->getValue ($ lazyGhost , 'privateUninitialized ' );
1036
1022
}
1023
+
1024
+ private function createUninitializedObjectPropertyGhost (): UninitializedObjectProperty
1025
+ {
1026
+ if (!class_exists (ProxyHelper::class)) {
1027
+ $ this ->markTestSkipped (sprintf ('Class "%s" is required to run this test. ' , ProxyHelper::class));
1028
+ }
1029
+
1030
+ $ class = 'UninitializedObjectPropertyGhost ' ;
1031
+
1032
+ if (!class_exists ($ class )) {
1033
+ eval ('class ' .$ class .ProxyHelper::generateLazyGhost (new \ReflectionClass (UninitializedObjectProperty::class)));
1034
+ }
1035
+
1036
+ $ this ->assertTrue (class_exists ($ class ));
1037
+
1038
+ return $ class ::createLazyGhost (initializer: function ($ instance ) {
1039
+ });
1040
+ }
1037
1041
}
You can’t perform that action at this time.
0 commit comments