summaryrefslogtreecommitdiff
path: root/www/wiki/extensions/SemanticMediaWiki/tests/phpunit/Unit/DefinesTest.php
blob: 1982c1af3c7e4bef6a39e4d936d564eed8ef4adc (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
26
27
28
29
30
31
32
33
34
35
36
37
<?php

namespace SMW\Tests;

/**
 * @group semantic-mediawiki
 *
 * @license GNU GPL v2+
 * @since 1.9
 *
 * @author mwjames
 */
class DefinesTest extends  \PHPUnit_Framework_TestCase {

	/**
	 * @dataProvider constantsDataProvider
	 */
	public function testConstants( $constant, $expected ) {
		$this->assertEquals( $expected, $constant );
	}

	public function constantsDataProvider() {
		return [
			[ SMW_HEADERS_SHOW, 2 ],
			[ SMW_HEADERS_PLAIN, 1 ],
			[ SMW_HEADERS_HIDE, 0 ],
			[ SMW_OUTPUT_HTML, 1 ],
			[ SMW_OUTPUT_WIKI, 2 ],
			[ SMW_OUTPUT_FILE, 3 ],
			[ SMW_FACTBOX_HIDDEN, 1 ],
			[ SMW_FACTBOX_SPECIAL, 2 ],
			[ SMW_FACTBOX_NONEMPTY, 3 ],
			[ SMW_FACTBOX_SHOWN, 5 ],
		];
	}

}