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' => [