summaryrefslogtreecommitdiff
path: root/tests/phpunit/includes/LicensesTest.php
blob: 63b2c395bd8995cfef250d850e15b5fdcb863470 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<?php

/**
 * @covers Licenses
 */
class LicensesTest extends MediaWikiTestCase {

	public function testLicenses() {
		$str = "
* Free licenses:
** GFDL|Debian disagrees
";

		$lc = new Licenses( array(
			'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' ) );
	}
}