wiki.techinc.nl/tests/phpunit/unit/includes/LicensesTest.php

29 lines
594 B
PHP
Raw Normal View History

<?php
/**
* @covers Licenses
*/
class LicensesTest extends MediaWikiUnitTestCase {
public function testLicenses() {
$str = "
* Free licenses:
** GFDL|Debian disagrees
";
$htmlform = $this->createMock( HTMLForm::class );
$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,
'parent' => $htmlform
] );
$this->assertInstanceOf( Licenses::class, $lc );
}
}