Debian Codegraph @

tests/phpunit/unit/includes/specials/formfields/LicensesTest.php

raw symbols SCIP
1 <?php
2
3 use MediaWiki\HTMLForm\HTMLForm;
4
5 /**
6 * @covers \Licenses
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', # Note can't test label-message because $wgOut is not defined
24 'name' => 'AnotherName',
25 'licenses' => $str,
26 'parent' => $htmlform
27 ] );
28 $this->assertInstanceOf( Licenses::class, $lc );
29 }
30 }