JsonLdStringFormatterTest   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A validProvider() 0 8 1
A getInstance() 0 3 1
1
<?php
2
3
namespace PPP\Wikidata\ValueFormatters\JsonLd;
4
5
use DataValues\StringValue;
6
use ValueFormatters\FormatterOptions;
7
8
/**
9
 * @covers PPP\Wikidata\ValueFormatters\JsonLd\JsonLdStringFormatter
10
 *
11
 * @licence AGPLv3+
12
 * @author Thomas Pellissier Tanon
13
 */
14
class JsonLdStringFormatterTest extends JsonLdFormatterTestBase {
15
16
	/**
17
	 * @see JsonLdFormatterTestBase::validProvider
18
	 */
19
	public function validProvider() {
20
		return array(
21
			array(
22
				new StringValue('foo'),
23
				(object) array('@value' => 'foo')
24
			),
25
		);
26
	}
27
28
	/**
29
	 * @see JsonLdFormatterTestBase::getInstance
30
	 */
31
	protected function getInstance(FormatterOptions $options = null) {
32
		return new JsonLdStringFormatter($options);
33
	}
34
}
35