MediaWiki REL1_31
ComposerInstalledTest.php
Go to the documentation of this file.
1<?php
2
4
5 private $installed;
6
7 public function setUp() {
8 parent::setUp();
9 global $IP;
10 $this->installed = "$IP/tests/phpunit/data/composer/installed.json";
11 }
12
17 public function testGetInstalledDependencies() {
18 $installed = new ComposerInstalled( $this->installed );
19 $this->assertArrayEquals( [
20 'leafo/lessphp' => [
21 'version' => '0.5.0',
22 'type' => 'library',
23 'licenses' => [ 'MIT', 'GPL-3.0-only' ],
24 'authors' => [
25 [
26 'name' => 'Leaf Corcoran',
27 'email' => 'leafot@gmail.com',
28 'homepage' => 'http://leafo.net',
29 ],
30 ],
31 'description' => 'lessphp is a compiler for LESS written in PHP.',
32 ],
33 'psr/log' => [
34 'version' => '1.0.0',
35 'type' => 'library',
36 'licenses' => [ 'MIT' ],
37 'authors' => [
38 [
39 'name' => 'PHP-FIG',
40 'homepage' => 'http://www.php-fig.org/',
41 ],
42 ],
43 'description' => 'Common interface for logging libraries',
44 ],
45 'cssjanus/cssjanus' => [
46 'version' => '1.1.1',
47 'type' => 'library',
48 'licenses' => [ 'Apache-2.0' ],
49 'authors' => [
50 ],
51 'description' => 'Convert CSS stylesheets between left-to-right ' .
52 'and right-to-left.',
53 ],
54 'cdb/cdb' => [
55 'version' => '1.0.0',
56 'type' => 'library',
57 'licenses' => [ 'GPLv2' ],
58 'authors' => [
59 [
60 'name' => 'Tim Starling',
61 'email' => 'tstarling@wikimedia.org',
62 ],
63 [
64 'name' => 'Chad Horohoe',
65 'email' => 'chad@wikimedia.org',
66 ],
67 ],
68 'description' => 'Constant Database (CDB) wrapper library for PHP. ' .
69 'Provides pure-PHP fallback when dba_* functions are absent.',
70 ],
71 'sebastian/version' => [
72 'version' => '2.0.1',
73 'type' => 'library',
74 'licenses' => [ 'BSD-3-Clause' ],
75 'authors' => [
76 [
77 'name' => 'Sebastian Bergmann',
78 'email' => 'sebastian@phpunit.de',
79 'role' => 'lead',
80 ],
81 ],
82 'description' => 'Library that helps with managing the version ' .
83 'number of Git-hosted PHP projects',
84 ],
85 'sebastian/resource-operations' => [
86 'version' => '1.0.0',
87 'type' => 'library',
88 'licenses' => [ 'BSD-3-Clause' ],
89 'authors' => [
90 [
91 'name' => 'Sebastian Bergmann',
92 'email' => 'sebastian@phpunit.de',
93 ],
94 ],
95 'description' => 'Provides a list of PHP built-in functions that ' .
96 'operate on resources',
97 ],
98 'sebastian/recursion-context' => [
99 'version' => '3.0.0',
100 'type' => 'library',
101 'licenses' => [ 'BSD-3-Clause' ],
102 'authors' => [
103 [
104 'name' => 'Jeff Welch',
105 'email' => 'whatthejeff@gmail.com',
106 ],
107 [
108 'name' => 'Sebastian Bergmann',
109 'email' => 'sebastian@phpunit.de',
110 ],
111 [
112 'name' => 'Adam Harvey',
113 'email' => 'aharvey@php.net',
114 ],
115 ],
116 'description' => 'Provides functionality to recursively process PHP ' .
117 'variables',
118 ],
119 'sebastian/object-reflector' => [
120 'version' => '1.1.1',
121 'type' => 'library',
122 'licenses' => [ 'BSD-3-Clause' ],
123 'authors' => [
124 [
125 'name' => 'Sebastian Bergmann',
126 'email' => 'sebastian@phpunit.de',
127 ],
128 ],
129 'description' => 'Allows reflection of object attributes, including ' .
130 'inherited and non-public ones',
131 ],
132 'sebastian/object-enumerator' => [
133 'version' => '3.0.3',
134 'type' => 'library',
135 'licenses' => [ 'BSD-3-Clause' ],
136 'authors' => [
137 [
138 'name' => 'Sebastian Bergmann',
139 'email' => 'sebastian@phpunit.de',
140 ],
141 ],
142 'description' => 'Traverses array structures and object graphs ' .
143 'to enumerate all referenced objects',
144 ],
145 'sebastian/global-state' => [
146 'version' => '2.0.0',
147 'type' => 'library',
148 'licenses' => [ 'BSD-3-Clause' ],
149 'authors' => [
150 [
151 'name' => 'Sebastian Bergmann',
152 'email' => 'sebastian@phpunit.de',
153 ],
154 ],
155 'description' => 'Snapshotting of global state',
156 ],
157 'sebastian/exporter' => [
158 'version' => '3.1.0',
159 'type' => 'library',
160 'licenses' => [ 'BSD-3-Clause' ],
161 'authors' => [
162 [
163 'name' => 'Jeff Welch',
164 'email' => 'whatthejeff@gmail.com',
165 ],
166 [
167 'name' => 'Volker Dusch',
168 'email' => 'github@wallbash.com',
169 ],
170 [
171 'name' => 'Bernhard Schussek',
172 'email' => 'bschussek@2bepublished.at',
173 ],
174 [
175 'name' => 'Sebastian Bergmann',
176 'email' => 'sebastian@phpunit.de',
177 ],
178 [
179 'name' => 'Adam Harvey',
180 'email' => 'aharvey@php.net',
181 ],
182 ],
183 'description' => 'Provides the functionality to export PHP ' .
184 'variables for visualization',
185 ],
186 'sebastian/environment' => [
187 'version' => '3.1.0',
188 'type' => 'library',
189 'licenses' => [ 'BSD-3-Clause' ],
190 'authors' => [
191 [
192 'name' => 'Sebastian Bergmann',
193 'email' => 'sebastian@phpunit.de',
194 ],
195 ],
196 'description' => 'Provides functionality to handle HHVM/PHP ' .
197 'environments',
198 ],
199 'sebastian/diff' => [
200 'version' => '2.0.1',
201 'type' => 'library',
202 'licenses' => [ 'BSD-3-Clause' ],
203 'authors' => [
204 [
205 'name' => 'Kore Nordmann',
206 'email' => 'mail@kore-nordmann.de',
207 ],
208 [
209 'name' => 'Sebastian Bergmann',
210 'email' => 'sebastian@phpunit.de',
211 ],
212 ],
213 'description' => 'Diff implementation',
214 ],
215 'sebastian/comparator' => [
216 'version' => '2.1.1',
217 'type' => 'library',
218 'licenses' => [ 'BSD-3-Clause' ],
219 'authors' => [
220 [
221 'name' => 'Jeff Welch',
222 'email' => 'whatthejeff@gmail.com',
223 ],
224 [
225 'name' => 'Volker Dusch',
226 'email' => 'github@wallbash.com',
227 ],
228 [
229 'name' => 'Bernhard Schussek',
230 'email' => 'bschussek@2bepublished.at',
231 ],
232 [
233 'name' => 'Sebastian Bergmann',
234 'email' => 'sebastian@phpunit.de',
235 ],
236 ],
237 'description' => 'Provides the functionality to compare PHP ' .
238 'values for equality',
239 ],
240 'doctrine/instantiator' => [
241 'version' => '1.1.0',
242 'type' => 'library',
243 'licenses' => [ 'MIT' ],
244 'authors' => [
245 [
246 'name' => 'Marco Pivetta',
247 'email' => 'ocramius@gmail.com',
248 'homepage' => 'http://ocramius.github.com/',
249 ],
250 ],
251 'description' => 'A small, lightweight utility to instantiate ' .
252 'objects in PHP without invoking their constructors',
253 ],
254 'phpunit/php-text-template' => [
255 'version' => '1.2.1',
256 'type' => 'library',
257 'licenses' => [ 'BSD-3-Clause' ],
258 'authors' => [
259 [
260 'name' => 'Sebastian Bergmann',
261 'email' => 'sebastian@phpunit.de',
262 'role' => 'lead',
263 ],
264 ],
265 'description' => 'Simple template engine.',
266 ],
267 'phpunit/phpunit-mock-objects' => [
268 'version' => '5.0.6',
269 'type' => 'library',
270 'licenses' => [ 'BSD-3-Clause' ],
271 'authors' => [
272 [
273 'name' => 'Sebastian Bergmann',
274 'email' => 'sebastian@phpunit.de',
275 'role' => 'lead',
276 ],
277 ],
278 'description' => 'Mock Object library for PHPUnit',
279 ],
280 'phpunit/php-timer' => [
281 'version' => '1.0.9',
282 'type' => 'library',
283 'licenses' => [ 'BSD-3-Clause' ],
284 'authors' => [
285 [
286 'name' => 'Sebastian Bergmann',
287 'email' => 'sb@sebastian-bergmann.de',
288 'role' => 'lead',
289 ],
290 ],
291 'description' => 'Utility class for timing',
292 ],
293 'phpunit/php-file-iterator' => [
294 'version' => '1.4.5',
295 'type' => 'library',
296 'licenses' => [ 'BSD-3-Clause' ],
297 'authors' => [
298 [
299 'name' => 'Sebastian Bergmann',
300 'email' => 'sb@sebastian-bergmann.de',
301 'role' => 'lead',
302 ],
303 ],
304 'description' => 'FilterIterator implementation that filters ' .
305 'files based on a list of suffixes.',
306 ],
307 'theseer/tokenizer' => [
308 'version' => '1.1.0',
309 'type' => 'library',
310 'licenses' => [ 'BSD-3-Clause' ],
311 'authors' => [
312 [
313 'name' => 'Arne Blankerts',
314 'email' => 'arne@blankerts.de',
315 'role' => 'Developer',
316 ],
317 ],
318 'description' => 'A small library for converting tokenized PHP ' .
319 'source code into XML and potentially other formats',
320 ],
321 'sebastian/code-unit-reverse-lookup' => [
322 'version' => '1.0.1',
323 'type' => 'library',
324 'licenses' => [ 'BSD-3-Clause' ],
325 'authors' => [
326 [
327 'name' => 'Sebastian Bergmann',
328 'email' => 'sebastian@phpunit.de',
329 ],
330 ],
331 'description' => 'Looks up which function or method a line of ' .
332 'code belongs to',
333 ],
334 'phpunit/php-token-stream' => [
335 'version' => '2.0.2',
336 'type' => 'library',
337 'licenses' => [ 'BSD-3-Clause' ],
338 'authors' => [
339 [
340 'name' => 'Sebastian Bergmann',
341 'email' => 'sebastian@phpunit.de',
342 ],
343 ],
344 'description' => 'Wrapper around PHP\'s tokenizer extension.',
345 ],
346 'phpunit/php-code-coverage' => [
347 'version' => '5.3.0',
348 'type' => 'library',
349 'licenses' => [ 'BSD-3-Clause' ],
350 'authors' => [
351 [
352 'name' => 'Sebastian Bergmann',
353 'email' => 'sebastian@phpunit.de',
354 'role' => 'lead',
355 ],
356 ],
357 'description' => 'Library that provides collection, processing, ' .
358 'and rendering functionality for PHP code coverage information.',
359 ],
360 'webmozart/assert' => [
361 'version' => '1.2.0',
362 'type' => 'library',
363 'licenses' => [ 'MIT' ],
364 'authors' => [
365 [
366 'name' => 'Bernhard Schussek',
367 'email' => 'bschussek@gmail.com',
368 ],
369 ],
370 'description' => 'Assertions to validate method input/output with ' .
371 'nice error messages.',
372 ],
373 'phpdocumentor/reflection-common' => [
374 'version' => '1.0.1',
375 'type' => 'library',
376 'licenses' => [ 'MIT' ],
377 'authors' => [
378 [
379 'name' => 'Jaap van Otterdijk',
380 'email' => 'opensource@ijaap.nl',
381 ],
382 ],
383 'description' => 'Common reflection classes used by phpdocumentor to ' .
384 'reflect the code structure',
385 ],
386 'phpdocumentor/type-resolver' => [
387 'version' => '0.4.0',
388 'type' => 'library',
389 'licenses' => [ 'MIT' ],
390 'authors' => [
391 [
392 'name' => 'Mike van Riel',
393 'email' => 'me@mikevanriel.com',
394 ],
395 ],
396 'description' => '',
397 ],
398 'phpdocumentor/reflection-docblock' => [
399 'version' => '4.2.0',
400 'type' => 'library',
401 'licenses' => [ 'MIT' ],
402 'authors' => [
403 [
404 'name' => 'Mike van Riel',
405 'email' => 'me@mikevanriel.com',
406 ],
407 ],
408 'description' => 'With this component, a library can provide support for ' .
409 'annotations via DocBlocks or otherwise retrieve information that ' .
410 'is embedded in a DocBlock.',
411 ],
412 'phpspec/prophecy' => [
413 'version' => '1.7.3',
414 'type' => 'library',
415 'licenses' => [ 'MIT' ],
416 'authors' => [
417 [
418 'name' => 'Konstantin Kudryashov',
419 'email' => 'ever.zet@gmail.com',
420 'homepage' => 'http://everzet.com',
421 ],
422 [
423 'name' => 'Marcello Duarte',
424 'email' => 'marcello.duarte@gmail.com',
425 ],
426 ],
427 'description' => 'Highly opinionated mocking framework for PHP 5.3+',
428 ],
429 'phar-io/version' => [
430 'version' => '1.0.1',
431 'type' => 'library',
432 'licenses' => [ 'BSD-3-Clause' ],
433 'authors' => [
434 [
435 'name' => 'Arne Blankerts',
436 'email' => 'arne@blankerts.de',
437 'role' => 'Developer',
438 ],
439 [
440 'name' => 'Sebastian Heuer',
441 'email' => 'sebastian@phpeople.de',
442 'role' => 'Developer',
443 ],
444 [
445 'name' => 'Sebastian Bergmann',
446 'email' => 'sebastian@phpunit.de',
447 'role' => 'Developer',
448 ],
449 ],
450 'description' => 'Library for handling version information and constraints',
451 ],
452 'phar-io/manifest' => [
453 'version' => '1.0.1',
454 'type' => 'library',
455 'licenses' => [ 'BSD-3-Clause' ],
456 'authors' => [
457 [
458 'name' => 'Arne Blankerts',
459 'email' => 'arne@blankerts.de',
460 'role' => 'Developer',
461 ],
462 [
463 'name' => 'Sebastian Heuer',
464 'email' => 'sebastian@phpeople.de',
465 'role' => 'Developer',
466 ],
467 [
468 'name' => 'Sebastian Bergmann',
469 'email' => 'sebastian@phpunit.de',
470 'role' => 'Developer',
471 ],
472 ],
473 'description' => 'Component for reading phar.io manifest ' .
474 'information from a PHP Archive (PHAR)',
475 ],
476 'myclabs/deep-copy' => [
477 'version' => '1.7.0',
478 'type' => 'library',
479 'licenses' => [ 'MIT' ],
480 'authors' => [
481 ],
482 'description' => 'Create deep copies (clones) of your objects',
483 ],
484 'phpunit/phpunit' => [
485 'version' => '6.5.5',
486 'type' => 'library',
487 'licenses' => [ 'BSD-3-Clause' ],
488 'authors' => [
489 [
490 'name' => 'Sebastian Bergmann',
491 'email' => 'sebastian@phpunit.de',
492 'role' => 'lead',
493 ],
494 ],
495 'description' => 'The PHP Unit Testing framework.',
496 ],
497 ], $installed->getInstalledDependencies(), false, true );
498 }
499}
testGetInstalledDependencies()
ComposerInstalled::__construct ComposerInstalled::getInstalledDependencies.
Reads an installed.json file and provides accessors to get what is installed.
assertArrayEquals(array $expected, array $actual, $ordered=false, $named=false)
Assert that two arrays are equal.
$IP
Definition update.php:3