Merge "Handle extension dependencies in the installer"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Tue, 17 Apr 2018 15:18:39 +0000 (15:18 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Tue, 17 Apr 2018 15:18:39 +0000 (15:18 +0000)
1  2 
tests/phpunit/includes/registration/VersionCheckerTest.php

@@@ -6,7 -6,6 +6,7 @@@
  class VersionCheckerTest extends PHPUnit\Framework\TestCase {
  
        use MediaWikiCoversValidator;
 +      use PHPUnit4And6Compat;
  
        /**
         * @dataProvider provideCheck
                                                'NoVersionGiven' => '1.0',
                                        ]
                                ],
-                               [ 'NoVersionGiven does not expose its version, but FakeExtension requires: 1.0.' ],
+                               [ [
+                                       'incompatible' => 'FakeExtension',
+                                       'type' => 'incompatible-extensions',
+                                       'msg' => 'NoVersionGiven does not expose its version, but FakeExtension requires: 1.0.'
+                               ] ],
                        ],
                        [
                                [
                                                'Missing' => '*',
                                        ]
                                ],
-                               [ 'FakeExtension requires Missing to be installed.' ],
+                               [ [
+                                       'missing' => 'Missing',
+                                       'type' => 'missing-extensions',
+                                       'msg' => 'FakeExtension requires Missing to be installed.',
+                               ] ],
                        ],
                        [
                                [
                                                'FakeDependency' => '2.0.0',
                                        ]
                                ],
-                               // phpcs:ignore Generic.Files.LineLength.TooLong
-                               [ 'FakeExtension is not compatible with the current installed version of FakeDependency (1.0.0), it requires: 2.0.0.' ],
+                               [ [
+                                       'incompatible' => 'FakeExtension',
+                                       'type' => 'incompatible-extensions',
+                                       // phpcs:ignore Generic.Files.LineLength.TooLong
+                                       'msg' => 'FakeExtension is not compatible with the current installed version of FakeDependency (1.0.0), it requires: 2.0.0.'
+                               ] ],
                        ]
                ];
        }
                                        'version' => 'not really valid',
                                ],
                        ] );
-               $this->assertEquals( [ "FakeDependency does not have a valid version string." ],
+               $this->assertEquals(
+                       [ [
+                               'type' => 'invalid-version',
+                               'msg' => "FakeDependency does not have a valid version string."
+                       ] ],
                        $checker->checkArray( [
                                'FakeExtension' => [
                                        'extensions' => [