MediaWiki REL1_31
ComposerLockTest.php
Go to the documentation of this file.
1<?php
2
4
5 private $lock;
6
7 public function setUp() {
8 parent::setUp();
9 global $IP;
10 $this->lock = "$IP/tests/phpunit/data/composer/composer.lock";
11 }
12
17 public function testGetInstalledDependencies() {
18 $lock = new ComposerLock( $this->lock );
19 $this->assertArrayEquals( [
20 'wikimedia/cdb' => [
21 'version' => '1.0.1',
22 'type' => 'library',
23 'licenses' => [ 'GPL-2.0-only' ],
24 'authors' => [
25 [
26 'name' => 'Tim Starling',
27 'email' => 'tstarling@wikimedia.org',
28 ],
29 [
30 'name' => 'Chad Horohoe',
31 'email' => 'chad@wikimedia.org',
32 ],
33 ],
34 'description' => 'Constant Database (CDB) wrapper library for PHP. '.
35 'Provides pure-PHP fallback when dba_* functions are absent.',
36 ],
37 'cssjanus/cssjanus' => [
38 'version' => '1.1.1',
39 'type' => 'library',
40 'licenses' => [ 'Apache-2.0' ],
41 'authors' => [],
42 'description' => 'Convert CSS stylesheets between left-to-right and right-to-left.',
43 ],
44 'leafo/lessphp' => [
45 'version' => '0.5.0',
46 'type' => 'library',
47 'licenses' => [ 'MIT', 'GPL-3.0-only' ],
48 'authors' => [
49 [
50 'name' => 'Leaf Corcoran',
51 'email' => 'leafot@gmail.com',
52 'homepage' => 'http://leafo.net',
53 ],
54 ],
55 'description' => 'lessphp is a compiler for LESS written in PHP.',
56 ],
57 'psr/log' => [
58 'version' => '1.0.0',
59 'type' => 'library',
60 'licenses' => [ 'MIT' ],
61 'authors' => [
62 [
63 'name' => 'PHP-FIG',
64 'homepage' => 'http://www.php-fig.org/',
65 ],
66 ],
67 'description' => 'Common interface for logging libraries',
68 ],
69 'oojs/oojs-ui' => [
70 'version' => '0.6.0',
71 'type' => 'library',
72 'licenses' => [ 'MIT' ],
73 'authors' => [],
74 'description' => '',
75 ],
76 'composer/installers' => [
77 'version' => '1.0.19',
78 'type' => 'composer-installer',
79 'licenses' => [ 'MIT' ],
80 'authors' => [
81 [
82 'name' => 'Kyle Robinson Young',
83 'email' => 'kyle@dontkry.com',
84 'homepage' => 'https://github.com/shama',
85 ],
86 ],
87 'description' => 'A multi-framework Composer library installer',
88 ],
89 'mediawiki/translate' => [
90 'version' => '2014.12',
91 'type' => 'mediawiki-extension',
92 'licenses' => [ 'GPL-2.0-or-later' ],
93 'authors' => [
94 [
95 'name' => 'Niklas Laxström',
96 'email' => 'niklas.laxstrom@gmail.com',
97 'role' => 'Lead nitpicker',
98 ],
99 [
100 'name' => 'Siebrand Mazeland',
101 'email' => 's.mazeland@xs4all.nl',
102 'role' => 'Developer',
103 ],
104 ],
105 'description' => 'The only standard solution to translate any kind ' .
106 'of text with an avant-garde web interface within MediaWiki, ' .
107 'including your documentation and software',
108 ],
109 'mediawiki/universal-language-selector' => [
110 'version' => '2014.12',
111 'type' => 'mediawiki-extension',
112 'licenses' => [ 'GPL-2.0-or-later', 'MIT' ],
113 'authors' => [],
114 'description' => 'The primary aim is to allow users to select a language ' .
115 'and configure its support in an easy way. ' .
116 'Main features are language selection, input methods and web fonts.',
117 ],
118 ], $lock->getInstalledDependencies(), false, true );
119 }
120
121}
testGetInstalledDependencies()
ComposerLock::__construct ComposerLock::getInstalledDependencies.
Reads a composer.lock file and provides accessors to get its hash and what is installed.
assertArrayEquals(array $expected, array $actual, $ordered=false, $named=false)
Assert that two arrays are equal.
$IP
Definition update.php:3