| 1 |
<?php |
| 2 |
|
| 3 |
use MediaWiki\HTMLForm\HTMLForm; |
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
class LicensesTest extends MediaWikiUnitTestCase { |
| 9 |
|
| 10 |
public function testLicenses() { |
| 11 |
$str = " |
| 12 |
* Free licenses: |
| 13 |
** GFDL|Debian disagrees |
| 14 |
"; |
| 15 |
|
| 16 |
$htmlform = $this->createMock( HTMLForm::class ); |
| 17 |
|
| 18 |
$lc = new Licenses( [ |
| 19 |
'fieldname' => 'FooField', |
| 20 |
'type' => 'select', |
| 21 |
'section' => 'description', |
| 22 |
'id' => 'wpLicense', |
| 23 |
'label' => 'A label text', |
| 24 |
'name' => 'AnotherName', |
| 25 |
'licenses' => $str, |
| 26 |
'parent' => $htmlform |
| 27 |
] ); |
| 28 |
$this->assertInstanceOf( Licenses::class, $lc ); |
| 29 |
} |
| 30 |
} |