wiki.techinc.nl/tests/phpunit/includes/LicensesTest.php
Umherirrender 45da581551 Use ::class to resolve class names in tests
This helps to find renamed or misspelled classes earlier.
Phan will check the class names

Change-Id: Ie541a7baae10ab6f5c13f95ac2ff6598b8f8950c
2018-01-26 22:49:13 +01:00

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 ) );
}
}