MediaWiki REL1_34
ReaderFactoryTest.php
Go to the documentation of this file.
1<?php
8namespace LocalisationUpdate;
9
13class ReaderFactoryTest extends \PHPUnit\Framework\TestCase {
17 public function testGetReader( $input, $expected, $comment ) {
18 $factory = new ReaderFactory();
19 $reader = $factory->getReader( $input );
20 $observed = get_class( $reader );
21 $this->assertEquals( $expected, $observed, $comment );
22 }
23
24 public function getReaderProvider() {
25 return [
26 [
27 'languages/i18n/fi.json',
28 'LocalisationUpdate\JSONReader',
29 'core json file',
30 ],
31 [
32 'extension/Translate/i18n/core/de.json',
33 'LocalisationUpdate\JSONReader',
34 'extension json file',
35 ],
36 ];
37 }
38}
@covers \LocalisationUpdate\ReaderFactory
testGetReader( $input, $expected, $comment)
@dataProvider getReaderProvider
Constructs readers for files based on the names.