|
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
|
|
|
|