|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
/** |
|
4
|
|
|
* File containing the RepositoryTest class. |
|
5
|
|
|
* |
|
6
|
|
|
* @copyright Copyright (C) eZ Systems AS. All rights reserved. |
|
7
|
|
|
* @license For full copyright and license information view LICENSE file distributed with this source code. |
|
8
|
|
|
*/ |
|
9
|
|
|
namespace eZ\Publish\Core\Repository\Tests\Service\Integration; |
|
10
|
|
|
|
|
11
|
|
|
use eZ\Publish\Core\Repository\Tests\Service\Integration\Base as BaseServiceTest; |
|
12
|
|
|
|
|
13
|
|
|
/** |
|
14
|
|
|
* @group repository |
|
15
|
|
|
*/ |
|
16
|
|
|
abstract class RepositoryTest extends BaseServiceTest |
|
17
|
|
|
{ |
|
18
|
|
|
/** |
|
19
|
|
|
* Test repository instance. |
|
20
|
|
|
* |
|
21
|
|
|
* @covers \eZ\Publish\API\Repository\Repository |
|
22
|
|
|
*/ |
|
23
|
|
|
public function testRepositoryInstance() |
|
24
|
|
|
{ |
|
25
|
|
|
self::assertInstanceOf('eZ\\Publish\\API\\Repository\\Repository', $this->repository); |
|
26
|
|
|
} |
|
27
|
|
|
|
|
28
|
|
|
/** |
|
29
|
|
|
* Test service method. |
|
30
|
|
|
* |
|
31
|
|
|
* @covers \eZ\Publish\API\Repository\Repository::getContentService |
|
32
|
|
|
*/ |
|
33
|
|
|
public function testGetContentService() |
|
34
|
|
|
{ |
|
35
|
|
|
$service = $this->repository->getContentService(); |
|
36
|
|
|
self::assertInstanceOf('eZ\\Publish\\API\\Repository\\ContentService', $service); |
|
37
|
|
|
} |
|
38
|
|
|
|
|
39
|
|
|
/** |
|
40
|
|
|
* Test service method. |
|
41
|
|
|
* |
|
42
|
|
|
* @covers \eZ\Publish\API\Repository\Repository::getContentTypeService |
|
43
|
|
|
*/ |
|
44
|
|
|
public function testGetContentTypeService() |
|
45
|
|
|
{ |
|
46
|
|
|
$service = $this->repository->getContentTypeService(); |
|
47
|
|
|
self::assertInstanceOf('eZ\\Publish\\API\\Repository\\ContentTypeService', $service); |
|
48
|
|
|
} |
|
49
|
|
|
|
|
50
|
|
|
/** |
|
51
|
|
|
* Test service method. |
|
52
|
|
|
* |
|
53
|
|
|
* @covers \eZ\Publish\API\Repository\Repository::getFieldTypeService |
|
54
|
|
|
*/ |
|
55
|
|
|
public function testGetFieldTypeService() |
|
56
|
|
|
{ |
|
57
|
|
|
$service = $this->repository->getFieldTypeService(); |
|
58
|
|
|
self::assertInstanceOf('eZ\\Publish\\API\\Repository\\FieldTypeService', $service); |
|
59
|
|
|
} |
|
60
|
|
|
|
|
61
|
|
|
/** |
|
62
|
|
|
* Test service method. |
|
63
|
|
|
* |
|
64
|
|
|
* @covers \eZ\Publish\API\Repository\Repository::getContentLanguageService |
|
65
|
|
|
*/ |
|
66
|
|
|
public function testGetContentLanguageService() |
|
67
|
|
|
{ |
|
68
|
|
|
$service = $this->repository->getContentLanguageService(); |
|
69
|
|
|
self::assertInstanceOf('eZ\\Publish\\API\\Repository\\LanguageService', $service); |
|
70
|
|
|
} |
|
71
|
|
|
|
|
72
|
|
|
/** |
|
73
|
|
|
* Test service method. |
|
74
|
|
|
* |
|
75
|
|
|
* @covers \eZ\Publish\API\Repository\Repository::getLocationService |
|
76
|
|
|
*/ |
|
77
|
|
|
public function testGetLocationService() |
|
78
|
|
|
{ |
|
79
|
|
|
$service = $this->repository->getLocationService(); |
|
80
|
|
|
self::assertInstanceOf('eZ\\Publish\\API\\Repository\\LocationService', $service); |
|
81
|
|
|
} |
|
82
|
|
|
|
|
83
|
|
|
/** |
|
84
|
|
|
* Test service method. |
|
85
|
|
|
* |
|
86
|
|
|
* @covers \eZ\Publish\API\Repository\Repository::getObjectStateService |
|
87
|
|
|
*/ |
|
88
|
|
|
public function testGetObjectStateService() |
|
89
|
|
|
{ |
|
90
|
|
|
$service = $this->repository->getObjectStateService(); |
|
91
|
|
|
self::assertInstanceOf('eZ\\Publish\\API\\Repository\\ObjectStateService', $service); |
|
92
|
|
|
} |
|
93
|
|
|
|
|
94
|
|
|
/** |
|
95
|
|
|
* Test service method. |
|
96
|
|
|
* |
|
97
|
|
|
* @covers \eZ\Publish\API\Repository\Repository::getRoleService |
|
98
|
|
|
*/ |
|
99
|
|
|
public function testGetRoleService() |
|
100
|
|
|
{ |
|
101
|
|
|
$service = $this->repository->getRoleService(); |
|
102
|
|
|
self::assertInstanceOf('eZ\\Publish\\API\\Repository\\RoleService', $service); |
|
103
|
|
|
} |
|
104
|
|
|
|
|
105
|
|
|
/** |
|
106
|
|
|
* Test service method. |
|
107
|
|
|
* |
|
108
|
|
|
* @covers \eZ\Publish\API\Repository\Repository::getSearchService |
|
109
|
|
|
*/ |
|
110
|
|
|
public function testGetSearchService() |
|
111
|
|
|
{ |
|
112
|
|
|
$service = $this->repository->getSearchService(); |
|
113
|
|
|
self::assertInstanceOf('eZ\\Publish\\API\\Repository\\SearchService', $service); |
|
114
|
|
|
} |
|
115
|
|
|
|
|
116
|
|
|
/** |
|
117
|
|
|
* Test service method. |
|
118
|
|
|
* |
|
119
|
|
|
* @covers \eZ\Publish\API\Repository\Repository::getSectionService |
|
120
|
|
|
*/ |
|
121
|
|
|
public function testGetSectionService() |
|
122
|
|
|
{ |
|
123
|
|
|
$service = $this->repository->getSectionService(); |
|
124
|
|
|
self::assertInstanceOf('eZ\\Publish\\API\\Repository\\SectionService', $service); |
|
125
|
|
|
} |
|
126
|
|
|
|
|
127
|
|
|
/** |
|
128
|
|
|
* Test service method. |
|
129
|
|
|
* |
|
130
|
|
|
* @covers \eZ\Publish\API\Repository\Repository::getTrashService |
|
131
|
|
|
*/ |
|
132
|
|
|
public function testGetTrashService() |
|
133
|
|
|
{ |
|
134
|
|
|
$service = $this->repository->getTrashService(); |
|
135
|
|
|
self::assertInstanceOf('eZ\\Publish\\API\\Repository\\TrashService', $service); |
|
136
|
|
|
} |
|
137
|
|
|
|
|
138
|
|
|
/** |
|
139
|
|
|
* Test service method. |
|
140
|
|
|
* |
|
141
|
|
|
* @covers \eZ\Publish\API\Repository\Repository::getURLAliasService |
|
142
|
|
|
*/ |
|
143
|
|
|
public function testGetURLAliasService() |
|
144
|
|
|
{ |
|
145
|
|
|
$service = $this->repository->getURLAliasService(); |
|
146
|
|
|
self::assertInstanceOf('eZ\\Publish\\API\\Repository\\URLAliasService', $service); |
|
147
|
|
|
} |
|
148
|
|
|
|
|
149
|
|
|
/** |
|
150
|
|
|
* Test service method. |
|
151
|
|
|
* |
|
152
|
|
|
* @covers \eZ\Publish\API\Repository\Repository::getURLWildcardService |
|
153
|
|
|
*/ |
|
154
|
|
|
public function testGetURLWildcardService() |
|
155
|
|
|
{ |
|
156
|
|
|
$service = $this->repository->getURLWildcardService(); |
|
157
|
|
|
self::assertInstanceOf('eZ\\Publish\\API\\Repository\\URLWildcardService', $service); |
|
158
|
|
|
} |
|
159
|
|
|
|
|
160
|
|
|
/** |
|
161
|
|
|
* Test service method. |
|
162
|
|
|
* |
|
163
|
|
|
* @covers \eZ\Publish\API\Repository\Repository::getUserService |
|
164
|
|
|
*/ |
|
165
|
|
|
public function testGetUserService() |
|
166
|
|
|
{ |
|
167
|
|
|
$service = $this->repository->getUserService(); |
|
168
|
|
|
self::assertInstanceOf('eZ\\Publish\\API\\Repository\\UserService', $service); |
|
169
|
|
|
} |
|
170
|
|
|
} |
|
171
|
|
|
|