Merge "DatabaseMssql: Don't duplicate body of makeList()"
[mediawiki.git] / tests / phpunit / includes / libs / composer / ComposerLockTest.php
blobb5fd5f6e71e6a0c532c3060615dd3af1b2c5ef9b
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',
31 'cssjanus/cssjanus' => array(
32 'version' => '1.1.1',
33 'type' => 'library',
35 'leafo/lessphp' => array(
36 'version' => '0.5.0',
37 'type' => 'library',
39 'psr/log' => array(
40 'version' => '1.0.0',
41 'type' => 'library',
43 'oojs/oojs-ui' => array(
44 'version' => '0.6.0',
45 'type' => 'library',
47 'composer/installers' => array(
48 'version' => '1.0.19',
49 'type' => 'composer-installer',
51 'mediawiki/translate' => array(
52 'version' => '2014.12',
53 'type' => 'mediawiki-extension',
55 'mediawiki/universal-language-selector' => array(
56 'version' => '2014.12',
57 'type' => 'mediawiki-extension',
59 ), $lock->getInstalledDependencies(), false, true );