Import: Handle uploads with sha1 starting with 0 properly
[mediawiki.git] / tests / phpunit / includes / libs / composer / ComposerLockTest.php
blob6b374f253923f7561064a8ec8ec50951173c845e
1 <?php
3 class ComposerLockTest extends MediaWikiTestCase {
5 private $lock;
7 public function setUp() {
8 parent::setUp();
9 global $IP;
10 $this->lock = "$IP/tests/phpunit/data/composer/composer.lock";
13 /**
14 * @covers ComposerLock::getHash
16 public function testGetHash() {
17 $lock = new ComposerLock( $this->lock );
18 $this->assertEquals( 'a3bb80b0ac4c4a31e52574d48c032923', $lock->getHash() );
21 /**
22 * @covers ComposerLock::getInstalledDependencies
24 public function testGetInstalledDependencies() {
25 $lock = new ComposerLock( $this->lock );
26 $this->assertArrayEquals( array(
27 'wikimedia/cdb' => array(
28 'version' => '1.0.1',
29 'type' => 'library',
30 'licenses' => array( 'GPL-2.0' ),
31 'authors' => array(
32 array(
33 'name' => 'Tim Starling',
34 'email' => 'tstarling@wikimedia.org',
36 array(
37 'name' => 'Chad Horohoe',
38 'email' => 'chad@wikimedia.org',
41 'description' => 'Constant Database (CDB) wrapper library for PHP. '.
42 'Provides pure-PHP fallback when dba_* functions are absent.',
44 'cssjanus/cssjanus' => array(
45 'version' => '1.1.1',
46 'type' => 'library',
47 'licenses' => array( 'Apache-2.0' ),
48 'authors' => array(),
49 'description' => 'Convert CSS stylesheets between left-to-right and right-to-left.',
51 'leafo/lessphp' => array(
52 'version' => '0.5.0',
53 'type' => 'library',
54 'licenses' => array( 'MIT', 'GPL-3.0' ),
55 'authors' => array(
56 array(
57 'name' => 'Leaf Corcoran',
58 'email' => 'leafot@gmail.com',
59 'homepage' => 'http://leafo.net',
62 'description' => 'lessphp is a compiler for LESS written in PHP.',
64 'psr/log' => array(
65 'version' => '1.0.0',
66 'type' => 'library',
67 'licenses' => array( 'MIT' ),
68 'authors' => array(
69 array(
70 'name' => 'PHP-FIG',
71 'homepage' => 'http://www.php-fig.org/',
74 'description' => 'Common interface for logging libraries',
76 'oojs/oojs-ui' => array(
77 'version' => '0.6.0',
78 'type' => 'library',
79 'licenses' => array( 'MIT' ),
80 'authors' => array(),
81 'description' => '',
83 'composer/installers' => array(
84 'version' => '1.0.19',
85 'type' => 'composer-installer',
86 'licenses' => array( 'MIT' ),
87 'authors' => array(
88 array(
89 'name' => 'Kyle Robinson Young',
90 'email' => 'kyle@dontkry.com',
91 'homepage' => 'https://github.com/shama',
94 'description' => 'A multi-framework Composer library installer',
96 'mediawiki/translate' => array(
97 'version' => '2014.12',
98 'type' => 'mediawiki-extension',
99 'licenses' => array( 'GPL-2.0+' ),
100 'authors' => array(
101 array(
102 'name' => 'Niklas Laxström',
103 'email' => 'niklas.laxstrom@gmail.com',
104 'role' => 'Lead nitpicker',
106 array(
107 'name' => 'Siebrand Mazeland',
108 'email' => 's.mazeland@xs4all.nl',
109 'role' => 'Developer',
112 'description' => 'The only standard solution to translate any kind ' .
113 'of text with an avant-garde web interface within MediaWiki, ' .
114 'including your documentation and software',
116 'mediawiki/universal-language-selector' => array(
117 'version' => '2014.12',
118 'type' => 'mediawiki-extension',
119 'licenses' => array( 'GPL-2.0+', 'MIT' ),
120 'authors' => array(),
121 'description' => 'The primary aim is to allow users to select a language ' .
122 'and configure its support in an easy way. ' .
123 'Main features are language selection, input methods and web fonts.',
125 ), $lock->getInstalledDependencies(), false, true );