File tree Expand file tree Collapse file tree 11 files changed +47
-112
lines changed
Expand file tree Collapse file tree 11 files changed +47
-112
lines changed Original file line number Diff line number Diff line change 1717use Symfony \Component \PropertyAccess \PropertyPath ;
1818use Symfony \Component \PropertyAccess \PropertyPathInterface ;
1919
20- /**
21- * @internal
22- */
23- #[\PHPUnit \Framework \Attributes \CoversNothing]
24- /**
25- * @internal
26- *
27- * @coversNothing
28- */
2920final class ObjectMapperTest extends TestCase
3021{
3122 public static function mappingDataProvider ()
@@ -64,10 +55,9 @@ public static function mappingDataProvider()
6455 }
6556
6657 #[\PHPUnit \Framework \Attributes \DataProvider('mappingDataProvider ' )]
67- #[\PHPUnit \Framework \Attributes \Test]
68- public function dynamicResults (
69- mixed $ expected ,
70- mixed $ input ,
58+ public function testDynamicResults (
59+ $ expected ,
60+ $ input ,
7161 ExpressionLanguage $ interpreter ,
7262 PropertyPathInterface $ outputField ,
7363 Expression ...$ expression
@@ -84,10 +74,9 @@ public function dynamicResults(
8474 }
8575
8676 #[\PHPUnit \Framework \Attributes \DataProvider('mappingDataProvider ' )]
87- #[\PHPUnit \Framework \Attributes \Test]
88- public function compilationResultsWithSpaghettiStrategy (
89- mixed $ expected ,
90- mixed $ input ,
77+ public function testCompilationResultsWithSpaghettiStrategy (
78+ $ expected ,
79+ $ input ,
9180 ExpressionLanguage $ interpreter ,
9281 PropertyPathInterface $ outputField ,
9382 Expression ...$ expression
Original file line number Diff line number Diff line change 1212use Symfony \Component \PropertyAccess \PropertyPath ;
1313use Symfony \Component \PropertyAccess \PropertyPathInterface ;
1414
15- /**
16- * @internal
17- */
18- #[\PHPUnit \Framework \Attributes \CoversNothing]
19- /**
20- * @internal
21- *
22- * @coversNothing
23- */
2415final class ConcatCopyValuesMapperTest extends TestCase
2516{
2617 public static function mappingDataProvider ()
@@ -108,10 +99,9 @@ public static function mappingDataProvider()
10899 }
109100
110101 #[\PHPUnit \Framework \Attributes \DataProvider('mappingDataProvider ' )]
111- #[\PHPUnit \Framework \Attributes \Test]
112- public function dynamicResults (
113- mixed $ expected ,
114- mixed $ input ,
102+ public function testDynamicResults (
103+ $ expected ,
104+ $ input ,
115105 PropertyPathInterface $ outputField ,
116106 string $ glue ,
117107 PropertyPathInterface ...$ inputFields
@@ -123,10 +113,9 @@ public function dynamicResults(
123113 }
124114
125115 #[\PHPUnit \Framework \Attributes \DataProvider('mappingDataProvider ' )]
126- #[\PHPUnit \Framework \Attributes \Test]
127- public function compilationResultsWithSpaghettiStrategy (
128- mixed $ expected ,
129- mixed $ input ,
116+ public function testCompilationResultsWithSpaghettiStrategy (
117+ $ expected ,
118+ $ input ,
130119 PropertyPathInterface $ outputField ,
131120 string $ glue ,
132121 PropertyPathInterface ...$ inputFields
Original file line number Diff line number Diff line change 1212use Symfony \Component \PropertyAccess \PropertyPath ;
1313use Symfony \Component \PropertyAccess \PropertyPathInterface ;
1414
15- /**
16- * @internal
17- */
18- #[\PHPUnit \Framework \Attributes \CoversNothing]
19- /**
20- * @internal
21- *
22- * @coversNothing
23- */
2415final class ConstantValueMapperTest extends TestCase
2516{
2617 public static function mappingDataProvider ()
@@ -100,10 +91,9 @@ public static function mappingDataProvider()
10091 }
10192
10293 #[\PHPUnit \Framework \Attributes \DataProvider('mappingDataProvider ' )]
103- #[\PHPUnit \Framework \Attributes \Test]
104- public function dynamicResults (
105- mixed $ expected ,
106- mixed $ input ,
94+ public function testDynamicResults (
95+ $ expected ,
96+ $ input ,
10797 PropertyPathInterface $ outputField ,
10898 string $ constantValue
10999 ): void {
@@ -114,10 +104,9 @@ public function dynamicResults(
114104 }
115105
116106 #[\PHPUnit \Framework \Attributes \DataProvider('mappingDataProvider ' )]
117- #[\PHPUnit \Framework \Attributes \Test]
118- public function compilationResultsWithSpaghettiStrategy (
119- mixed $ expected ,
120- mixed $ input ,
107+ public function testCompilationResultsWithSpaghettiStrategy (
108+ $ expected ,
109+ $ input ,
121110 PropertyPathInterface $ outputField ,
122111 string $ constantValue
123112 ): void {
Original file line number Diff line number Diff line change 1212use Symfony \Component \PropertyAccess \PropertyPath ;
1313use Symfony \Component \PropertyAccess \PropertyPathInterface ;
1414
15- /**
16- * @internal
17- */
18- #[\PHPUnit \Framework \Attributes \CoversNothing]
19- /**
20- * @internal
21- *
22- * @coversNothing
23- */
2415final class CopyValueMapperTest extends TestCase
2516{
2617 public static function mappingDataProvider ()
@@ -100,10 +91,9 @@ public static function mappingDataProvider()
10091 }
10192
10293 #[\PHPUnit \Framework \Attributes \DataProvider('mappingDataProvider ' )]
103- #[\PHPUnit \Framework \Attributes \Test]
104- public function dynamicResults (
105- mixed $ expected ,
106- mixed $ input ,
94+ public function testDynamicResults (
95+ $ expected ,
96+ $ input ,
10797 PropertyPathInterface $ outputField ,
10898 PropertyPathInterface $ inputField
10999 ): void {
@@ -114,10 +104,9 @@ public function dynamicResults(
114104 }
115105
116106 #[\PHPUnit \Framework \Attributes \DataProvider('mappingDataProvider ' )]
117- #[\PHPUnit \Framework \Attributes \Test]
118- public function compilationResultsWithSpaghettiStrategy (
119- mixed $ expected ,
120- mixed $ input ,
107+ public function testCompilationResultsWithSpaghettiStrategy (
108+ $ expected ,
109+ $ input ,
121110 PropertyPathInterface $ outputField ,
122111 PropertyPathInterface $ inputField
123112 ): void {
Original file line number Diff line number Diff line change 1414use Symfony \Component \PropertyAccess \PropertyPath ;
1515use Symfony \Component \PropertyAccess \PropertyPathInterface ;
1616
17- /**
18- * @internal
19- */
20- #[\PHPUnit \Framework \Attributes \CoversNothing]
21- /**
22- * @internal
23- *
24- * @coversNothing
25- */
2617final class ExpressionLanguageValueMapperTest extends TestCase
2718{
2819 public static function mappingDataProvider ()
@@ -140,10 +131,9 @@ public static function mappingDataProvider()
140131 }
141132
142133 #[\PHPUnit \Framework \Attributes \DataProvider('mappingDataProvider ' )]
143- #[\PHPUnit \Framework \Attributes \Test]
144- public function dynamicResults (
145- mixed $ expected ,
146- mixed $ input ,
134+ public function testDynamicResults (
135+ $ expected ,
136+ $ input ,
147137 PropertyPathInterface $ outputField ,
148138 Expression $ expression ,
149139 ExpressionLanguage $ interpreter
@@ -155,10 +145,9 @@ public function dynamicResults(
155145 }
156146
157147 #[\PHPUnit \Framework \Attributes \DataProvider('mappingDataProvider ' )]
158- #[\PHPUnit \Framework \Attributes \Test]
159- public function compilationResultsWithSpaghettiStrategy (
160- mixed $ expected ,
161- mixed $ input ,
148+ public function testCompilationResultsWithSpaghettiStrategy (
149+ $ expected ,
150+ $ input ,
162151 PropertyPathInterface $ outputField ,
163152 Expression $ expression ,
164153 ExpressionLanguage $ interpreter
Original file line number Diff line number Diff line change 3030use PhpParser \ParserFactory ;
3131use PHPUnit \Framework \TestCase ;
3232
33- /**
34- * @internal
35- */
36- #[\PHPUnit \Framework \Attributes \CoversNothing]
37- /**
38- * @internal
39- *
40- * @coversNothing
41- */
4233final class MappingTest extends TestCase
4334{
4435 public static function dataProvider ()
@@ -196,8 +187,7 @@ public static function dataProvider()
196187 }
197188
198189 #[\PHPUnit \Framework \Attributes \DataProvider('dataProvider ' )]
199- #[\PHPUnit \Framework \Attributes \Test]
200- public function mapping (ClassTypeMetadata $ expected ): void
190+ public function testMapping (ClassTypeMetadata $ expected )
201191 {
202192 $ typeGuesser = new CompositeTypeGuesser (
203193 new NativeTypeGuesser (),
Original file line number Diff line number Diff line change @@ -29,8 +29,8 @@ public function getNode(): Node\Expr
2929 ;
3030
3131 /** @var Node\Expr $inputNodes */
32- $ inputNodes = $ inputNodes [0 ];
32+ $ inputNode = $ inputNodes [0 ];
3333
34- return $ inputNodes [ 0 ] ->expr ;
34+ return $ inputNode ->expr ;
3535 }
3636}
Original file line number Diff line number Diff line change @@ -64,7 +64,7 @@ public function compile(Node\Expr $outputNode): array
6464 ),
6565 ),
6666 ],
67- array_merge (
67+ ( array ) array_merge (
6868 ...$ this ->compileMappers (new Node \Expr \Variable ('output ' ))
6969 ),
7070 [
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ public function __construct(
2323 private PropertyPathInterface $ outputPath ,
2424 private readonly ExpressionLanguage $ interpreter ,
2525 private readonly Expression $ inputExpression ,
26- private readonly Mapping \ObjectMapperInterface $ child
26+ private readonly Mapping \CompilableMapperInterface $ child
2727 ) {
2828 $ this ->accessor = PropertyAccess::createPropertyAccessor ();
2929 }
You can’t perform that action at this time.
0 commit comments