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::getInstalledDependencies
24 public function testGetInstalledDependencies() {
25 $lock = new ComposerLock( $this->lock
);
26 $this->assertArrayEquals( array(
27 'wikimedia/cdb' => array(
30 'licenses' => array( 'GPL-2.0' ),
33 'name' => 'Tim Starling',
34 'email' => 'tstarling@wikimedia.org',
37 'name' => 'Chad Horohoe',
38 'email' => 'chad@wikimedia.org',
41 'description' => 'Constant Database (CDB) wrapper library for PHP. Provides pure-PHP fallback when dba_* functions are absent.',
43 'cssjanus/cssjanus' => array(
46 'licenses' => array( 'Apache-2.0' ),
48 'description' => 'Convert CSS stylesheets between left-to-right and right-to-left.',
50 'leafo/lessphp' => array(
53 'licenses' => array( 'MIT', 'GPL-3.0' ),
56 'name' => 'Leaf Corcoran',
57 'email' => 'leafot@gmail.com',
58 'homepage' => 'http://leafo.net',
61 'description' => 'lessphp is a compiler for LESS written in PHP.',
66 'licenses' => array( 'MIT' ),
70 'homepage' => 'http://www.php-fig.org/',
73 'description' => 'Common interface for logging libraries',
75 'oojs/oojs-ui' => array(
78 'licenses' => array( 'MIT' ),
82 'composer/installers' => array(
83 'version' => '1.0.19',
84 'type' => 'composer-installer',
85 'licenses' => array( 'MIT' ),
88 'name' => 'Kyle Robinson Young',
89 'email' => 'kyle@dontkry.com',
90 'homepage' => 'https://github.com/shama',
93 'description' => 'A multi-framework Composer library installer',
95 'mediawiki/translate' => array(
96 'version' => '2014.12',
97 'type' => 'mediawiki-extension',
98 'licenses' => array( 'GPL-2.0+' ),
101 'name' => 'Niklas Laxström',
102 'email' => 'niklas.laxstrom@gmail.com',
103 'role' => 'Lead nitpicker',
106 'name' => 'Siebrand Mazeland',
107 'email' => 's.mazeland@xs4all.nl',
108 'role' => 'Developer',
111 'description' => 'The only standard solution to translate any kind of text with an avant-garde web interface within MediaWiki, including your documentation and software',
113 'mediawiki/universal-language-selector' => array(
114 'version' => '2014.12',
115 'type' => 'mediawiki-extension',
116 'licenses' => array( 'GPL-2.0+', 'MIT' ),
117 'authors' => array(),
118 'description' => 'The primary aim is to allow users to select a language and configure its support in an easy way. Main features are language selection, input methods and web fonts.',
120 ), $lock->getInstalledDependencies(), false, true );