JsonLdStringFormatterTest::getInstance()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 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