* parent::setUp() should be first, and ::tearDown() should be last * Move tests that directly extend PHPUnit\Framework\TestCase to /unit Change-Id: I1172855c58f4f52a8f624e6d596ec43beb8c93ff
25 lines
516 B
PHP
25 lines
516 B
PHP
<?php
|
|
|
|
/**
|
|
* @covers Licenses
|
|
*/
|
|
class LicensesTest extends MediaWikiUnitTestCase {
|
|
|
|
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->assertInstanceOf( Licenses::class, $lc );
|
|
}
|
|
}
|