2010-12-14 16:26:35 +00:00
|
|
|
<?php
|
|
|
|
|
|
2013-10-24 16:45:52 +00:00
|
|
|
/**
|
|
|
|
|
* @covers Licenses
|
|
|
|
|
*/
|
2010-12-28 18:17:16 +00:00
|
|
|
class LicensesTest extends MediaWikiTestCase {
|
2010-12-14 16:26:35 +00:00
|
|
|
|
2013-10-23 22:51:31 +00:00
|
|
|
public function testLicenses() {
|
2010-12-14 16:26:35 +00:00
|
|
|
$str = "
|
|
|
|
|
* Free licenses:
|
|
|
|
|
** GFDL|Debian disagrees
|
|
|
|
|
";
|
|
|
|
|
|
2016-02-17 09:09:32 +00:00
|
|
|
$lc = new Licenses( [
|
2010-12-16 17:34:13 +00:00
|
|
|
'fieldname' => 'FooField',
|
|
|
|
|
'type' => 'select',
|
|
|
|
|
'section' => 'description',
|
|
|
|
|
'id' => 'wpLicense',
|
2010-12-16 18:06:08 +00:00
|
|
|
'label' => 'A label text', # Note can't test label-message because $wgOut is not defined
|
2013-02-14 11:22:13 +00:00
|
|
|
'name' => 'AnotherName',
|
|
|
|
|
'licenses' => $str,
|
2016-02-17 09:09:32 +00:00
|
|
|
] );
|
2018-01-13 00:02:09 +00:00
|
|
|
$this->assertThat( $lc, $this->isInstanceOf( Licenses::class ) );
|
2010-12-14 16:26:35 +00:00
|
|
|
}
|
|
|
|
|
}
|