@@ -16,18 +16,21 @@ require __DIR__ . '/../bootstrap.php';
16
16
class Foo
17
17
{
18
18
public $ bars ;
19
+ public $ waldos ;
19
20
public $ foos ;
20
21
public $ strings ;
21
22
22
23
23
24
/**
24
25
* @param Service[] $bars
26
+ * @param list<Service> $waldos
25
27
* @param array<int,Foo> $foos
26
28
* @param string[] $strings
27
29
*/
28
- public function __construct (array $ bars = [], ?array $ foos = null , array $ strings = ['default ' ])
30
+ public function __construct (array $ bars = [], array $ waldos = [], ?array $ foos = null , array $ strings = ['default ' ])
29
31
{
30
32
$ this ->bars = $ bars ;
33
+ $ this ->waldos = $ waldos ;
31
34
$ this ->foos = $ foos ;
32
35
$ this ->strings = $ strings ;
33
36
}
@@ -67,6 +70,11 @@ Assert::same([
67
70
$ container ->getService ('s2 ' ),
68
71
$ container ->getService ('s3 ' ),
69
72
], $ foo ->bars );
73
+ Assert::same ([
74
+ $ container ->getService ('s1 ' ),
75
+ $ container ->getService ('s2 ' ),
76
+ $ container ->getService ('s3 ' ),
77
+ ], $ foo ->waldos );
70
78
Assert::same ([], $ foo ->foos );
71
79
Assert::same (['default ' ], $ foo ->strings );
72
80
@@ -80,5 +88,10 @@ Assert::same([
80
88
$ container ->getService ('s2 ' ),
81
89
$ container ->getService ('s3 ' ),
82
90
], $ foo2 ->bars );
91
+ Assert::same ([
92
+ $ container ->getService ('s1 ' ),
93
+ $ container ->getService ('s2 ' ),
94
+ $ container ->getService ('s3 ' ),
95
+ ], $ foo2 ->waldos );
83
96
Assert::same ([$ foo ], $ foo2 ->foos ); // difference
84
97
Assert::same (['default ' ], $ foo2 ->strings );
0 commit comments