Use interwiki cache directly to resolve transwiki import sources
[lhc/web/wiklou.git] / tests / phpunit / includes / libs / composer / ComposerLockTest.php
1 <?php
2
3 class ComposerLockTest extends MediaWikiTestCase {
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
13 /**
14 * @covers ComposerLock::getHash
15 */
16 public function testGetHash() {
17 $lock = new ComposerLock( $this->lock );
18 $this->assertEquals( 'a3bb80b0ac4c4a31e52574d48c032923', $lock->getHash() );
19 }
20
21 /**
22 * @covers ComposerLock::getInstalledDependencies
23 */
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',
35 ),
36 array(
37 'name' => 'Chad Horohoe',
38 'email' => 'chad@wikimedia.org',
39 ),
40 ),
41 'description' => 'Constant Database (CDB) wrapper library for PHP. Provides pure-PHP fallback when dba_* functions are absent.',
42 ),
43 'cssjanus/cssjanus' => array(
44 'version' => '1.1.1',
45 'type' => 'library',
46 'licenses' => array( 'Apache-2.0' ),
47 'authors' => array(),
48 'description' => 'Convert CSS stylesheets between left-to-right and right-to-left.',
49 ),
50 'leafo/lessphp' => array(
51 'version' => '0.5.0',
52 'type' => 'library',
53 'licenses' => array( 'MIT', 'GPL-3.0' ),
54 'authors' => array(
55 array(
56 'name' => 'Leaf Corcoran',
57 'email' => 'leafot@gmail.com',
58 'homepage' => 'http://leafo.net',
59 ),
60 ),
61 'description' => 'lessphp is a compiler for LESS written in PHP.',
62 ),
63 'psr/log' => array(
64 'version' => '1.0.0',
65 'type' => 'library',
66 'licenses' => array( 'MIT' ),
67 'authors' => array(
68 array(
69 'name' => 'PHP-FIG',
70 'homepage' => 'http://www.php-fig.org/',
71 ),
72 ),
73 'description' => 'Common interface for logging libraries',
74 ),
75 'oojs/oojs-ui' => array(
76 'version' => '0.6.0',
77 'type' => 'library',
78 'licenses' => array( 'MIT' ),
79 'authors' => array(),
80 'description' => '',
81 ),
82 'composer/installers' => array(
83 'version' => '1.0.19',
84 'type' => 'composer-installer',
85 'licenses' => array( 'MIT' ),
86 'authors' => array(
87 array(
88 'name' => 'Kyle Robinson Young',
89 'email' => 'kyle@dontkry.com',
90 'homepage' => 'https://github.com/shama',
91 ),
92 ),
93 'description' => 'A multi-framework Composer library installer',
94 ),
95 'mediawiki/translate' => array(
96 'version' => '2014.12',
97 'type' => 'mediawiki-extension',
98 'licenses' => array( 'GPL-2.0+' ),
99 'authors' => array(
100 array(
101 'name' => 'Niklas Laxström',
102 'email' => 'niklas.laxstrom@gmail.com',
103 'role' => 'Lead nitpicker',
104 ),
105 array(
106 'name' => 'Siebrand Mazeland',
107 'email' => 's.mazeland@xs4all.nl',
108 'role' => 'Developer',
109 ),
110 ),
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',
112 ),
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.',
119 ),
120 ), $lock->getInstalledDependencies(), false, true );
121 }
122
123 }