Completed
Push — master ( 388143...889690 )
by Thomas
05:32 queued 02:57
created

EntityStoreTest   A

Complexity

Total Complexity 9

Size/Duplication

Total Lines 65
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 5
Bugs 0 Features 3
Metric Value
wmc 9
c 5
b 0
f 3
lcom 1
cbo 1
dl 0
loc 65
rs 10

9 Methods

Rating   Name   Duplication   Size   Complexity  
A testGetEntityLookup() 0 6 1
A testGetEntityDocumentLookup() 0 6 1
A testGetItemLookup() 0 6 1
A testGetPropertyLookup() 0 6 1
A testGetItemIdForTermLookup() 0 6 1
A testGetPropertyIdForTermLookup() 0 6 1
A testGetItemIdForQueryLookup() 0 6 1
A testGetPropertyIdForQueryLookup() 0 6 1
A testGetEntityDocumentSaver() 0 6 1
1
<?php
2
3
namespace Wikibase\EntityStore;
4
5
/**
6
 * @covers Wikibase\EntityStore\EntityStore
7
 *
8
 * @licence GPLv2+
9
 * @author Thomas Pellissier Tanon
10
 */
11
class EntityStoreTest extends \PHPUnit_Framework_TestCase {
12
13
	public function testGetEntityLookup() {
14
		$storeMock = $this->getMockForAbstractClass( 'Wikibase\EntityStore\EntityStore' );
15
16
		$this->setExpectedException( 'Wikibase\EntityStore\FeatureNotSupportedException');
17
		$storeMock->getEntityLookup();
18
	}
19
20
	public function testGetEntityDocumentLookup() {
21
		$storeMock = $this->getMockForAbstractClass( 'Wikibase\EntityStore\EntityStore' );
22
23
		$this->setExpectedException( 'Wikibase\EntityStore\FeatureNotSupportedException');
24
		$storeMock->getEntityDocumentLookup();
25
	}
26
27
	public function testGetItemLookup() {
28
		$storeMock = $this->getMockForAbstractClass( 'Wikibase\EntityStore\EntityStore' );
29
30
		$this->setExpectedException( 'Wikibase\EntityStore\FeatureNotSupportedException');
31
		$storeMock->getItemLookup();
32
	}
33
34
	public function testGetPropertyLookup() {
35
		$storeMock = $this->getMockForAbstractClass( 'Wikibase\EntityStore\EntityStore' );
36
37
		$this->setExpectedException( 'Wikibase\EntityStore\FeatureNotSupportedException');
38
		$storeMock->getPropertyLookup();
39
	}
40
41
	public function testGetItemIdForTermLookup() {
42
		$storeMock = $this->getMockForAbstractClass( 'Wikibase\EntityStore\EntityStore' );
43
44
		$this->setExpectedException( 'Wikibase\EntityStore\FeatureNotSupportedException');
45
		$storeMock->getItemIdForTermLookup();
46
	}
47
48
	public function testGetPropertyIdForTermLookup() {
49
		$storeMock = $this->getMockForAbstractClass( 'Wikibase\EntityStore\EntityStore' );
50
51
		$this->setExpectedException( 'Wikibase\EntityStore\FeatureNotSupportedException');
52
		$storeMock->getPropertyIdForTermLookup();
53
	}
54
55
	public function testGetItemIdForQueryLookup() {
56
		$storeMock = $this->getMockForAbstractClass( 'Wikibase\EntityStore\EntityStore' );
57
58
		$this->setExpectedException( 'Wikibase\EntityStore\FeatureNotSupportedException');
59
		$storeMock->getItemIdForQueryLookup();
60
	}
61
62
	public function testGetPropertyIdForQueryLookup() {
63
		$storeMock = $this->getMockForAbstractClass( 'Wikibase\EntityStore\EntityStore' );
64
65
		$this->setExpectedException( 'Wikibase\EntityStore\FeatureNotSupportedException');
66
		$storeMock->getPropertyIdForQueryLookup();
67
	}
68
69
	public function testGetEntityDocumentSaver() {
70
		$storeMock = $this->getMockForAbstractClass( 'Wikibase\EntityStore\EntityStore' );
71
72
		$this->setExpectedException( 'Wikibase\EntityStore\FeatureNotSupportedException');
73
		$storeMock->getEntityDocumentSaver();
74
	}
75
}
76