wiki.techinc.nl/tests/phpunit/unit/includes/LicensesTest.php
DannyS712 6a93b0ca93 More misc test cleanup
* parent::setUp() should be first, and ::tearDown()
  should be last
* Move tests that directly extend PHPUnit\Framework\TestCase
  to /unit

Change-Id: I1172855c58f4f52a8f624e6d596ec43beb8c93ff
2020-12-24 00:52:06 +00:00

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