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