This helps to find renamed or misspelled classes earlier. Phan will check the class names Change-Id: Ie541a7baae10ab6f5c13f95ac2ff6598b8f8950c
25 lines
529 B
PHP
25 lines
529 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::class ) );
|
|
}
|
|
}
|