3 class ComposerLockTest
extends MediaWikiTestCase
{
7 public function setUp() {
10 $this->lock
= "$IP/tests/phpunit/data/composer/composer.lock";
14 * @covers ComposerLock::getHash
16 public function testGetHash() {
17 $lock = new ComposerLock( $this->lock
);
18 $this->assertEquals( 'a3bb80b0ac4c4a31e52574d48c032923', $lock->getHash() );
22 * @covers ComposerLock::__construct
23 * @covers ComposerLock::getInstalledDependencies
25 public function testGetInstalledDependencies() {
26 $lock = new ComposerLock( $this->lock
);
27 $this->assertArrayEquals( [
31 'licenses' => [ 'GPL-2.0' ],
34 'name' => 'Tim Starling',
35 'email' => 'tstarling@wikimedia.org',
38 'name' => 'Chad Horohoe',
39 'email' => 'chad@wikimedia.org',
42 'description' => 'Constant Database (CDB) wrapper library for PHP. '.
43 'Provides pure-PHP fallback when dba_* functions are absent.',
45 'cssjanus/cssjanus' => [
48 'licenses' => [ 'Apache-2.0' ],
50 'description' => 'Convert CSS stylesheets between left-to-right and right-to-left.',
55 'licenses' => [ 'MIT', 'GPL-3.0' ],
58 'name' => 'Leaf Corcoran',
59 'email' => 'leafot@gmail.com',
60 'homepage' => 'http://leafo.net',
63 'description' => 'lessphp is a compiler for LESS written in PHP.',
68 'licenses' => [ 'MIT' ],
72 'homepage' => 'http://www.php-fig.org/',
75 'description' => 'Common interface for logging libraries',
80 'licenses' => [ 'MIT' ],
84 'composer/installers' => [
85 'version' => '1.0.19',
86 'type' => 'composer-installer',
87 'licenses' => [ 'MIT' ],
90 'name' => 'Kyle Robinson Young',
91 'email' => 'kyle@dontkry.com',
92 'homepage' => 'https://github.com/shama',
95 'description' => 'A multi-framework Composer library installer',
97 'mediawiki/translate' => [
98 'version' => '2014.12',
99 'type' => 'mediawiki-extension',
100 'licenses' => [ 'GPL-2.0+' ],
103 'name' => 'Niklas Laxström',
104 'email' => 'niklas.laxstrom@gmail.com',
105 'role' => 'Lead nitpicker',
108 'name' => 'Siebrand Mazeland',
109 'email' => 's.mazeland@xs4all.nl',
110 'role' => 'Developer',
113 'description' => 'The only standard solution to translate any kind ' .
114 'of text with an avant-garde web interface within MediaWiki, ' .
115 'including your documentation and software',
117 'mediawiki/universal-language-selector' => [
118 'version' => '2014.12',
119 'type' => 'mediawiki-extension',
120 'licenses' => [ 'GPL-2.0+', 'MIT' ],
122 'description' => 'The primary aim is to allow users to select a language ' .
123 'and configure its support in an easy way. ' .
124 'Main features are language selection, input methods and web fonts.',
126 ], $lock->getInstalledDependencies(), false, true );