Merge "Only return CORS headers in the response as required"
[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 public function testGetHash() {
14 $lock = new ComposerLock( $this->lock );
15 $this->assertEquals( 'cc6e7fc565b246cb30b0cac103a2b31e', $lock->getHash() );
16 }
17
18 /**
19 * @covers ComposerLockParser::getInstalledDependencies
20 */
21 public function testGetInstalledDependencies() {
22 $lock = new ComposerLock( $this->lock );
23 $this->assertArrayEquals( array(
24 'cdb/cdb' => '1.0.0',
25 'cssjanus/cssjanus' => '1.1.1',
26 'leafo/lessphp' => '0.5.0',
27 'psr/log' => '1.0.0',
28 ), $lock->getInstalledDependencies(), false, true );
29 }
30
31 }