StringParserTest   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 32
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 3
dl 0
loc 32
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A validInputProvider() 0 8 1
A invalidInputProvider() 0 7 1
A getInstance() 0 3 1
1
<?php
2
3
namespace PPP\Wikidata\ValueParsers;
4
5
use DataValues\StringValue;
6
use ValueParsers\ParserOptions;
7
use ValueParsers\Test\ValueParserTestBase;
8
9
/**
10
 * @covers PPP\Wikidata\ValueParsers\StringParser
11
 *
12
 * @licence AGPLv3+
13
 * @author Thomas Pellissier Tanon
14
 */
15
class StringParserTest extends ValueParserTestBase {
16
17
	/**
18
	 * @see ValueParserTestBase::validInputProvider
19
	 */
20
	public function validInputProvider() {
21
		return array(
22
			array(
23
				'Douglas Adams',
24
				new StringValue('Douglas Adams')
25
			)
26
		);
27
	}
28
29
	/**
30
	 * @see ValueParserTestBase::invalidInputProvider
31
	 */
32
	public function invalidInputProvider() {
33
		return array(
34
			array(
35
				false
36
			)
37
		);
38
	}
39
40
	/**
41
	 * @see ValueParserTestBase::getInstance
42
	 */
43
	protected function getInstance(ParserOptions $options = null) {
44
		return new StringParser($options);
45
	}
46
}
47