NullStatementGrouperTest   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 4

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 4
dl 0
loc 13
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A testGroupStatements() 0 9 1
1
<?php
2
3
namespace Wikibase\DataModel\Services\Tests\Statement\Grouper;
4
5
use PHPUnit\Framework\TestCase;
6
use Wikibase\DataModel\Services\Statement\Grouper\NullStatementGrouper;
7
use Wikibase\DataModel\Snak\PropertyNoValueSnak;
8
use Wikibase\DataModel\Statement\StatementList;
9
10
/**
11
 * @covers \Wikibase\DataModel\Services\Statement\Grouper\NullStatementGrouper
12
 *
13
 * @license GPL-2.0-or-later
14
 * @author Thiemo Kreuz
15
 */
16
class NullStatementGrouperTest extends TestCase {
17
18
	public function testGroupStatements() {
19
		$statements = new StatementList();
20
		$statements->addNewStatement( new PropertyNoValueSnak( 1 ) );
21
22
		$expected = [ 'statements' => $statements ];
23
24
		$grouper = new NullStatementGrouper();
25
		$this->assertSame( $expected, $grouper->groupStatements( $statements ) );
26
	}
27
28
}
29