2014-12-08 20:08:52 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
class ComposerLockTest extends MediaWikiTestCase {
|
|
|
|
|
|
|
|
|
|
private $lock;
|
|
|
|
|
|
|
|
|
|
public function setUp() {
|
|
|
|
|
parent::setUp();
|
|
|
|
|
global $IP;
|
|
|
|
|
$this->lock = "$IP/tests/phpunit/data/composer/composer.lock";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
2016-08-26 01:28:22 +00:00
|
|
|
* @covers ComposerLock::__construct
|
2015-01-02 06:18:40 +00:00
|
|
|
* @covers ComposerLock::getInstalledDependencies
|
2014-12-08 20:08:52 +00:00
|
|
|
*/
|
|
|
|
|
public function testGetInstalledDependencies() {
|
|
|
|
|
$lock = new ComposerLock( $this->lock );
|
2016-02-17 09:09:32 +00:00
|
|
|
$this->assertArrayEquals( [
|
|
|
|
|
'wikimedia/cdb' => [
|
2015-01-03 23:28:02 +00:00
|
|
|
'version' => '1.0.1',
|
|
|
|
|
'type' => 'library',
|
2016-02-17 09:09:32 +00:00
|
|
|
'licenses' => [ 'GPL-2.0' ],
|
|
|
|
|
'authors' => [
|
|
|
|
|
[
|
2015-06-26 01:30:40 +00:00
|
|
|
'name' => 'Tim Starling',
|
|
|
|
|
'email' => 'tstarling@wikimedia.org',
|
2016-02-17 09:09:32 +00:00
|
|
|
],
|
|
|
|
|
[
|
2015-06-26 01:30:40 +00:00
|
|
|
'name' => 'Chad Horohoe',
|
|
|
|
|
'email' => 'chad@wikimedia.org',
|
2016-02-17 09:09:32 +00:00
|
|
|
],
|
|
|
|
|
],
|
2015-10-03 13:44:47 +00:00
|
|
|
'description' => 'Constant Database (CDB) wrapper library for PHP. '.
|
|
|
|
|
'Provides pure-PHP fallback when dba_* functions are absent.',
|
2016-02-17 09:09:32 +00:00
|
|
|
],
|
|
|
|
|
'cssjanus/cssjanus' => [
|
2015-01-03 23:28:02 +00:00
|
|
|
'version' => '1.1.1',
|
|
|
|
|
'type' => 'library',
|
2016-02-17 09:09:32 +00:00
|
|
|
'licenses' => [ 'Apache-2.0' ],
|
|
|
|
|
'authors' => [],
|
2015-06-26 01:30:40 +00:00
|
|
|
'description' => 'Convert CSS stylesheets between left-to-right and right-to-left.',
|
2016-02-17 09:09:32 +00:00
|
|
|
],
|
|
|
|
|
'leafo/lessphp' => [
|
2015-01-03 23:28:02 +00:00
|
|
|
'version' => '0.5.0',
|
|
|
|
|
'type' => 'library',
|
2016-02-17 09:09:32 +00:00
|
|
|
'licenses' => [ 'MIT', 'GPL-3.0' ],
|
|
|
|
|
'authors' => [
|
|
|
|
|
[
|
2015-06-26 01:30:40 +00:00
|
|
|
'name' => 'Leaf Corcoran',
|
|
|
|
|
'email' => 'leafot@gmail.com',
|
|
|
|
|
'homepage' => 'http://leafo.net',
|
2016-02-17 09:09:32 +00:00
|
|
|
],
|
|
|
|
|
],
|
2015-06-26 01:30:40 +00:00
|
|
|
'description' => 'lessphp is a compiler for LESS written in PHP.',
|
2016-02-17 09:09:32 +00:00
|
|
|
],
|
|
|
|
|
'psr/log' => [
|
2015-01-03 23:28:02 +00:00
|
|
|
'version' => '1.0.0',
|
|
|
|
|
'type' => 'library',
|
2016-02-17 09:09:32 +00:00
|
|
|
'licenses' => [ 'MIT' ],
|
|
|
|
|
'authors' => [
|
|
|
|
|
[
|
2015-06-26 01:30:40 +00:00
|
|
|
'name' => 'PHP-FIG',
|
|
|
|
|
'homepage' => 'http://www.php-fig.org/',
|
2016-02-17 09:09:32 +00:00
|
|
|
],
|
|
|
|
|
],
|
2015-06-26 01:30:40 +00:00
|
|
|
'description' => 'Common interface for logging libraries',
|
2016-02-17 09:09:32 +00:00
|
|
|
],
|
|
|
|
|
'oojs/oojs-ui' => [
|
2015-01-03 23:28:02 +00:00
|
|
|
'version' => '0.6.0',
|
|
|
|
|
'type' => 'library',
|
2016-02-17 09:09:32 +00:00
|
|
|
'licenses' => [ 'MIT' ],
|
|
|
|
|
'authors' => [],
|
2015-06-26 01:30:40 +00:00
|
|
|
'description' => '',
|
2016-02-17 09:09:32 +00:00
|
|
|
],
|
|
|
|
|
'composer/installers' => [
|
2015-01-03 23:28:02 +00:00
|
|
|
'version' => '1.0.19',
|
|
|
|
|
'type' => 'composer-installer',
|
2016-02-17 09:09:32 +00:00
|
|
|
'licenses' => [ 'MIT' ],
|
|
|
|
|
'authors' => [
|
|
|
|
|
[
|
2015-06-26 01:30:40 +00:00
|
|
|
'name' => 'Kyle Robinson Young',
|
|
|
|
|
'email' => 'kyle@dontkry.com',
|
|
|
|
|
'homepage' => 'https://github.com/shama',
|
2016-02-17 09:09:32 +00:00
|
|
|
],
|
|
|
|
|
],
|
2015-06-26 01:30:40 +00:00
|
|
|
'description' => 'A multi-framework Composer library installer',
|
2016-02-17 09:09:32 +00:00
|
|
|
],
|
|
|
|
|
'mediawiki/translate' => [
|
2015-01-03 23:28:02 +00:00
|
|
|
'version' => '2014.12',
|
|
|
|
|
'type' => 'mediawiki-extension',
|
2016-02-17 09:09:32 +00:00
|
|
|
'licenses' => [ 'GPL-2.0+' ],
|
|
|
|
|
'authors' => [
|
|
|
|
|
[
|
2015-06-26 01:30:40 +00:00
|
|
|
'name' => 'Niklas Laxström',
|
|
|
|
|
'email' => 'niklas.laxstrom@gmail.com',
|
|
|
|
|
'role' => 'Lead nitpicker',
|
2016-02-17 09:09:32 +00:00
|
|
|
],
|
|
|
|
|
[
|
2015-06-26 01:30:40 +00:00
|
|
|
'name' => 'Siebrand Mazeland',
|
|
|
|
|
'email' => 's.mazeland@xs4all.nl',
|
|
|
|
|
'role' => 'Developer',
|
2016-02-17 09:09:32 +00:00
|
|
|
],
|
|
|
|
|
],
|
2015-10-03 13:44:47 +00:00
|
|
|
'description' => 'The only standard solution to translate any kind ' .
|
|
|
|
|
'of text with an avant-garde web interface within MediaWiki, ' .
|
|
|
|
|
'including your documentation and software',
|
2016-02-17 09:09:32 +00:00
|
|
|
],
|
|
|
|
|
'mediawiki/universal-language-selector' => [
|
2015-01-03 23:28:02 +00:00
|
|
|
'version' => '2014.12',
|
|
|
|
|
'type' => 'mediawiki-extension',
|
2016-02-17 09:09:32 +00:00
|
|
|
'licenses' => [ 'GPL-2.0+', 'MIT' ],
|
|
|
|
|
'authors' => [],
|
2015-10-03 13:44:47 +00:00
|
|
|
'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.',
|
2016-02-17 09:09:32 +00:00
|
|
|
],
|
|
|
|
|
], $lock->getInstalledDependencies(), false, true );
|
2014-12-08 20:08:52 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|