@@ -59,7 +59,11 @@ public function testDownloadPackagesDownloadsEverythingWithNoInstalled()
59
59
['foo ' => $ entry1 , 'bar.js/file ' => $ entry2 , 'baz ' => $ entry3 ],
60
60
$ progressCallback
61
61
)
62
- ->willReturn (['foo ' => 'foo content ' , 'bar.js/file ' => 'bar content ' , 'baz ' => 'baz content ' ]);
62
+ ->willReturn ([
63
+ 'foo ' => ['content ' => 'foo content ' , 'dependencies ' => []],
64
+ 'bar.js/file ' => ['content ' => 'bar content ' , 'dependencies ' => []],
65
+ 'baz ' => ['content ' => 'baz content ' , 'dependencies ' => []],
66
+ ]);
63
67
64
68
$ downloader = new RemotePackageDownloader (
65
69
$ configReader ,
@@ -78,9 +82,9 @@ public function testDownloadPackagesDownloadsEverythingWithNoInstalled()
78
82
$ installed = require self ::$ writableRoot .'/assets/vendor/installed.php ' ;
79
83
$ this ->assertEquals (
80
84
[
81
- 'foo ' => ['path ' => 'foo.js ' , 'version ' => '1.0.0 ' ],
82
- 'bar.js/file ' => ['path ' => 'bar.js/file.js ' , 'version ' => '1.0.0 ' ],
83
- 'baz ' => ['path ' => 'baz.css ' , 'version ' => '1.0.0 ' ],
85
+ 'foo ' => ['path ' => 'foo.js ' , 'version ' => '1.0.0 ' , ' dependencies ' => [] ],
86
+ 'bar.js/file ' => ['path ' => 'bar.js/file.js ' , 'version ' => '1.0.0 ' , ' dependencies ' => [] ],
87
+ 'baz ' => ['path ' => 'baz.css ' , 'version ' => '1.0.0 ' , ' dependencies ' => [] ],
84
88
],
85
89
$ installed
86
90
);
@@ -90,9 +94,9 @@ public function testPackagesWithCorrectInstalledVersionSkipped()
90
94
{
91
95
$ this ->filesystem ->mkdir (self ::$ writableRoot .'/assets/vendor ' );
92
96
$ installed = [
93
- 'foo ' => ['path ' => 'foo.js ' , 'version ' => '1.0.0 ' ],
94
- 'bar.js/file ' => ['path ' => 'bar.js/file.js ' , 'version ' => '1.0.0 ' ],
95
- 'baz ' => ['path ' => 'baz.css ' , 'version ' => '1.0.0 ' ],
97
+ 'foo ' => ['path ' => 'foo.js ' , 'version ' => '1.0.0 ' , ' dependencies ' => [] ],
98
+ 'bar.js/file ' => ['path ' => 'bar.js/file.js ' , 'version ' => '1.0.0 ' , ' dependencies ' => [] ],
99
+ 'baz ' => ['path ' => 'baz.css ' , 'version ' => '1.0.0 ' , ' dependencies ' => [] ],
96
100
];
97
101
file_put_contents (
98
102
self ::$ writableRoot .'/assets/vendor/installed.php ' ,
@@ -118,7 +122,10 @@ public function testPackagesWithCorrectInstalledVersionSkipped()
118
122
119
123
$ packageResolver ->expects ($ this ->once ())
120
124
->method ('downloadPackages ' )
121
- ->willReturn (['bar.js/file ' => 'new bar content ' , 'baz ' => 'new baz content ' ]);
125
+ ->willReturn ([
126
+ 'bar.js/file ' => ['content ' => 'new bar content ' , 'dependencies ' => []],
127
+ 'baz ' => ['content ' => 'new baz content ' , 'dependencies ' => []],
128
+ ]);
122
129
123
130
$ downloader = new RemotePackageDownloader (
124
131
$ configReader ,
@@ -137,9 +144,9 @@ public function testPackagesWithCorrectInstalledVersionSkipped()
137
144
$ installed = require self ::$ writableRoot .'/assets/vendor/installed.php ' ;
138
145
$ this ->assertEquals (
139
146
[
140
- 'foo ' => ['path ' => 'foo.js ' , 'version ' => '1.0.0 ' ],
141
- 'bar.js/file ' => ['path ' => 'bar.js/file.js ' , 'version ' => '1.0.0 ' ],
142
- 'baz ' => ['path ' => 'baz.css ' , 'version ' => '1.1.0 ' ],
147
+ 'foo ' => ['path ' => 'foo.js ' , 'version ' => '1.0.0 ' , ' dependencies ' => [] ],
148
+ 'bar.js/file ' => ['path ' => 'bar.js/file.js ' , 'version ' => '1.0.0 ' , ' dependencies ' => [] ],
149
+ 'baz ' => ['path ' => 'baz.css ' , 'version ' => '1.1.0 ' , ' dependencies ' => [] ],
143
150
],
144
151
$ installed
145
152
);
@@ -149,7 +156,7 @@ public function testGetDownloadedPath()
149
156
{
150
157
$ this ->filesystem ->mkdir (self ::$ writableRoot .'/assets/vendor ' );
151
158
$ installed = [
152
- 'foo ' => ['path ' => 'foo-path.js ' , 'version ' => '1.0.0 ' ],
159
+ 'foo ' => ['path ' => 'foo-path.js ' , 'version ' => '1.0.0 ' , ' dependencies ' => [] ],
153
160
];
154
161
file_put_contents (
155
162
self ::$ writableRoot .'/assets/vendor/installed.php ' ,
0 commit comments