summaryrefslogtreecommitdiff
blob: 1a704ea91d1313184834f8000ca8e6dfe6c870c8 (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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
<?php

namespace SMW\Test;

use SMW\InfoParserFunction;

/**
 * Tests for the InfoParserFunction class
 *
 * @file
 *
 * @license GNU GPL v2+
 * @since   1.9
 *
 * @author mwjames
 */

/**
 * @covers \SMW\InfoParserFunction
 *
 * @ingroup Test
 *
 * @group SMW
 * @group SMWExtension
 */
class InfoParserFunctionTest extends ParserTestCase {

	/**
	 * Returns the name of the class to be tested
	 *
	 * @return string
	 */
	public function getClass() {
		return '\SMW\InfoParserFunction';
	}

	/**
	 * @test InfoParserFunction::__construct
	 *
	 * @since 1.9
	 */
	public function testConstructor() {
		$instance = new InfoParserFunction();
		$this->assertInstanceOf( $this->getClass(), $instance );
	}

	/**
	 * @test InfoParserFunction::staticInit
	 *
	 * @since 1.9
	 */
	public function testStaticInit() {
		$parser = $this->getParser( $this->newTitle(), $this->getUser() );
		$result = InfoParserFunction::staticInit( $parser );
		$this->assertTrue( $result );
	}
}