wiki.techinc.nl/tests/phpunit/includes/LicensesTest.php
Kunal Mehta 6e9b4f0e9c Convert all array() syntax to []
Per wikitech-l consensus:
 https://lists.wikimedia.org/pipermail/wikitech-l/2016-February/084821.html

Notes:
* Disabled CallTimePassByReference due to false positives (T127163)

Change-Id: I2c8ce713ce6600a0bb7bf67537c87044c7a45c4b
2016-02-17 01:33:00 -08:00

25 lines
524 B
PHP

<?php
/**
* @covers Licenses
*/
class LicensesTest extends MediaWikiTestCase {
public function testLicenses() {
$str = "
* Free licenses:
** GFDL|Debian disagrees
";
$lc = new Licenses( [
'fieldname' => 'FooField',
'type' => 'select',
'section' => 'description',
'id' => 'wpLicense',
'label' => 'A label text', # Note can't test label-message because $wgOut is not defined
'name' => 'AnotherName',
'licenses' => $str,
] );
$this->assertThat( $lc, $this->isInstanceOf( 'Licenses' ) );
}
}