Skip to content

Commit ff142b7

Browse files
committed
10254: Renamed ez_lock object state group to ibexa_lock
1 parent 7ea74c5 commit ff142b7

File tree

16 files changed

+51
-51
lines changed

16 files changed

+51
-51
lines changed

data/mysql/cleandata.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ VALUES (2, 2, 1, 'not_locked', 3, 0),
33
(2, 2, 2, 'locked', 3, 1);
44

55
INSERT INTO `ibexa_object_state_group` (`default_language_id`, `id`, `identifier`, `language_mask`)
6-
VALUES (2,2,'ez_lock',3);
6+
VALUES (2,2,'ibexa_lock',3);
77

88
INSERT INTO `ibexa_object_state_group_language` (`contentobject_state_group_id`, `description`, `language_id`, `name`, `real_language_id`)
99
VALUES (2,'',3,'Lock',2);

data/postgresql/cleandata.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ VALUES (2, 2, 1, 'not_locked', 3, 0),
33
(2, 2, 2, 'locked', 3, 1);
44

55
INSERT INTO "ibexa_object_state_group" ("default_language_id", "id", "identifier", "language_mask")
6-
VALUES (2, 2, 'ez_lock', 3);
6+
VALUES (2, 2, 'ibexa_lock', 3);
77

88
INSERT INTO "ibexa_object_state_group_language" ("contentobject_state_group_id", "description","language_id", "name", "real_language_id")
99
VALUES (2, '', 3, 'Lock', 2);

tests/integration/Core/Repository/Filtering/BaseRepositoryFilteringTestCase.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -255,9 +255,9 @@ public function getCriteriaForInitialData(): iterable
255255
yield 'ObjectStateIdentifier=not_locked' => new Criterion\ObjectStateIdentifier(
256256
'not_locked'
257257
);
258-
yield 'ObjectStateIdentifier=ez_lock(not_locked)' => new Criterion\ObjectStateIdentifier(
258+
yield 'ObjectStateIdentifier=ibexa_lock(not_locked)' => new Criterion\ObjectStateIdentifier(
259259
['not_locked'],
260-
'ez_lock'
260+
'ibexa_lock'
261261
);
262262
yield 'ParentLocationId=1' => new Criterion\ParentLocationId(1);
263263
yield 'RemoteId=8a9c9c761004866fb458d89910f52bee' => new Criterion\RemoteId(

tests/integration/Core/Repository/ObjectStateServiceAuthorizationTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ public function testUpdateObjectStateGroupThrowsUnauthorizedException()
8888
$permissionResolver->setCurrentUserReference($userService->loadUser($anonymousUserId));
8989

9090
// $objectStateGroupId contains the ID of the standard object state
91-
// group ez_lock.
91+
// group ibexa_lock.
9292
$objectStateService = $repository->getObjectStateService();
9393

9494
$loadedObjectStateGroup = $objectStateService->loadObjectStateGroup(
@@ -138,7 +138,7 @@ public function testDeleteObjectStateGroupThrowsUnauthorizedException()
138138
$permissionResolver->setCurrentUserReference($userService->loadUser($anonymousUserId));
139139

140140
// $objectStateGroupId contains the ID of the standard object state
141-
// group ez_lock.
141+
// group ibexa_lock.
142142
$objectStateService = $repository->getObjectStateService();
143143

144144
$loadedObjectStateGroup = $objectStateService->loadObjectStateGroup(
@@ -175,7 +175,7 @@ public function testCreateObjectStateThrowsUnauthorizedException()
175175
$permissionResolver->setCurrentUserReference($userService->loadUser($anonymousUserId));
176176

177177
// $objectStateGroupId contains the ID of the standard object state
178-
// group ez_lock.
178+
// group ibexa_lock.
179179
$objectStateService = $repository->getObjectStateService();
180180

181181
$loadedObjectStateGroup = $objectStateService->loadObjectStateGroup(
@@ -353,7 +353,7 @@ public function testSetContentStateThrowsUnauthorizedException()
353353
$permissionResolver->setCurrentUserReference($userService->loadUser($anonymousUserId));
354354

355355
// $anonymousUserId is the content ID of "Anonymous User"
356-
// $ezLockObjectStateGroupId contains the ID of the "ez_lock" object
356+
// $ezLockObjectStateGroupId contains the ID of the "ibexa_lock" object
357357
// state group
358358
// $lockedObjectStateId is the ID of the state "locked"
359359
$contentService = $repository->getContentService();

tests/integration/Core/Repository/ObjectStateServiceTest.php

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
*/
2727
class ObjectStateServiceTest extends BaseTestCase
2828
{
29-
private const EXISTING_OBJECT_STATE_GROUP_IDENTIFIER = 'ez_lock';
29+
private const EXISTING_OBJECT_STATE_GROUP_IDENTIFIER = 'ibexa_lock';
3030
private const EXISTING_OBJECT_STATE_IDENTIFIER = 'locked';
3131

3232
private const NON_EXISTING_OBJECT_STATE_GROUP_IDENTIFIER = 'non-existing';
@@ -299,8 +299,8 @@ public function testCreateObjectStateGroupThrowsInvalidArgumentException()
299299
$objectStateService = $repository->getObjectStateService();
300300

301301
$objectStateGroupCreate = $objectStateService->newObjectStateGroupCreateStruct(
302-
// 'ez_lock' is already existing identifier
303-
'ez_lock'
302+
// 'ibexa_lock' is already existing identifier
303+
'ibexa_lock'
304304
);
305305
$objectStateGroupCreate->defaultLanguageCode = 'eng-US';
306306
$objectStateGroupCreate->names = [
@@ -312,7 +312,7 @@ public function testCreateObjectStateGroupThrowsInvalidArgumentException()
312312
'eng-GB' => 'Put something ton Sindelfingen.',
313313
];
314314

315-
// This call will fail because group with 'ez_lock' identifier already exists
315+
// This call will fail because group with 'ibexa_lock' identifier already exists
316316
$objectStateService->createObjectStateGroup(
317317
$objectStateGroupCreate
318318
);
@@ -330,7 +330,7 @@ public function testLoadObjectStateGroup()
330330
$objectStateGroupId = $this->generateId('objectstategroup', 2);
331331
/* BEGIN: Use Case */
332332
// $objectStateGroupId contains the ID of the standard object state
333-
// group ez_lock.
333+
// group ibexa_lock.
334334
$objectStateService = $repository->getObjectStateService();
335335

336336
$loadedObjectStateGroup = $objectStateService->loadObjectStateGroup(
@@ -346,7 +346,7 @@ public function testLoadObjectStateGroup()
346346
$this->assertPropertiesCorrect(
347347
[
348348
'id' => 2,
349-
'identifier' => 'ez_lock',
349+
'identifier' => 'ibexa_lock',
350350
'mainLanguageCode' => 'eng-US',
351351
'languageCodes' => ['eng-US'],
352352
'names' => ['eng-US' => 'Lock'],
@@ -404,7 +404,7 @@ public function testLoadObjectStateGroupByIdentifier(): void
404404
$this->assertPropertiesCorrect(
405405
[
406406
'id' => 2,
407-
'identifier' => 'ez_lock',
407+
'identifier' => 'ibexa_lock',
408408
'mainLanguageCode' => 'eng-US',
409409
'languageCodes' => ['eng-US'],
410410
'names' => ['eng-US' => 'Lock'],
@@ -447,7 +447,7 @@ public function testLoadObjectStateGroups()
447447
$repository = $this->getRepository();
448448

449449
$expectedGroupIdentifiers = $this->getGroupIdentifierMap($this->createObjectStateGroups());
450-
$expectedGroupIdentifiers['ez_lock'] = true;
450+
$expectedGroupIdentifiers['ibexa_lock'] = true;
451451

452452
/* BEGIN: Use Case */
453453
$objectStateService = $repository->getObjectStateService();
@@ -636,7 +636,7 @@ public function testLoadObjectStates()
636636
$objectStateGroupId = $this->generateId('objectstategroup', 2);
637637
/* BEGIN: Use Case */
638638
// $objectStateGroupId contains the ID of the standard object state
639-
// group ez_lock.
639+
// group ibexa_lock.
640640
$objectStateService = $repository->getObjectStateService();
641641

642642
$objectStateGroup = $objectStateService->loadObjectStateGroup(
@@ -671,7 +671,7 @@ public function testUpdateObjectStateGroup()
671671
$objectStateGroupId = $this->generateId('objectstategroup', 2);
672672
/* BEGIN: Use Case */
673673
// $objectStateGroupId contains the ID of the standard object state
674-
// group ez_lock.
674+
// group ibexa_lock.
675675
$objectStateService = $repository->getObjectStateService();
676676

677677
$loadedObjectStateGroup = $objectStateService->loadObjectStateGroup(
@@ -742,7 +742,7 @@ public function testUpdateObjectStateGroupChosenFieldsOnly()
742742
$this->assertPropertiesCorrect(
743743
[
744744
'id' => 2,
745-
'identifier' => 'ez_lock',
745+
'identifier' => 'ibexa_lock',
746746
'mainLanguageCode' => 'eng-GB',
747747
'languageCodes' => ['eng-GB'],
748748
'names' => ['eng-GB' => 'Test'],
@@ -790,8 +790,8 @@ public function testUpdateObjectStateGroupThrowsInvalidArgumentException()
790790
);
791791

792792
$groupUpdateStruct = $objectStateService->newObjectStateGroupUpdateStruct();
793-
// 'ez_lock' is the identifier of already existing group
794-
$groupUpdateStruct->identifier = 'ez_lock';
793+
// 'ibexa_lock' is the identifier of already existing group
794+
$groupUpdateStruct->identifier = 'ibexa_lock';
795795
$groupUpdateStruct->defaultLanguageCode = 'ger-DE';
796796
$groupUpdateStruct->names = [
797797
'ger-DE' => 'Sindelfingen',
@@ -800,7 +800,7 @@ public function testUpdateObjectStateGroupThrowsInvalidArgumentException()
800800
'ger-DE' => 'Sindelfingen ist nicht nur eine Stadt',
801801
];
802802

803-
// This call will fail since state group with 'ez_lock' identifier already exists
803+
// This call will fail since state group with 'ibexa_lock' identifier already exists
804804
$objectStateService->updateObjectStateGroup(
805805
$createdObjectStateGroup,
806806
$groupUpdateStruct
@@ -848,7 +848,7 @@ public function testCreateObjectState()
848848
$objectStateGroupId = $this->generateId('objectstategroup', 2);
849849
/* BEGIN: Use Case */
850850
// $objectStateGroupId contains the ID of the standard object state
851-
// group ez_lock.
851+
// group ibexa_lock.
852852
$objectStateService = $repository->getObjectStateService();
853853

854854
$loadedObjectStateGroup = $objectStateService->loadObjectStateGroup(
@@ -962,7 +962,7 @@ public function testCreateObjectStateThrowsInvalidArgumentException()
962962

963963
$objectStateGroupId = $this->generateId('objectstategroup', 2);
964964
// $objectStateGroupId contains the ID of the standard object state
965-
// group ez_lock.
965+
// group ibexa_lock.
966966
$objectStateService = $repository->getObjectStateService();
967967

968968
$loadedObjectStateGroup = $objectStateService->loadObjectStateGroup(
@@ -1605,7 +1605,7 @@ public function testGetContentState()
16051605
$ezLockObjectStateGroupId
16061606
);
16071607

1608-
// Loads the state of $contentInfo in the "ez_lock" object state group
1608+
// Loads the state of $contentInfo in the "ibexa_lock" object state group
16091609
$ezLockObjectState = $objectStateService->getContentState(
16101610
$contentInfo,
16111611
$ezLockObjectStateGroup
@@ -1703,7 +1703,7 @@ public function testSetContentState()
17031703
$lockedObjectStateId = $this->generateId('objectstate', 2);
17041704
/* BEGIN: Use Case */
17051705
// $anonymousUserId is the content ID of "Anonymous User"
1706-
// $ezLockObjectStateGroupId contains the ID of the "ez_lock" object
1706+
// $ezLockObjectStateGroupId contains the ID of the "ibexa_lock" object
17071707
// state group
17081708
// $lockedObjectStateId is the ID of the state "locked"
17091709
$contentService = $repository->getContentService();
@@ -1850,7 +1850,7 @@ public function testDeleteObjectStateGroup()
18501850
$objectStateGroupId = $this->generateId('objectstategroup', 2);
18511851
/* BEGIN: Use Case */
18521852
// $objectStateGroupId contains the ID of the standard object state
1853-
// group ez_lock.
1853+
// group ibexa_lock.
18541854
$objectStateService = $repository->getObjectStateService();
18551855

18561856
$loadedObjectStateGroup = $objectStateService->loadObjectStateGroup(

tests/integration/Core/Repository/SearchService/Aggregation/ObjectStateTermAggregationTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ final class ObjectStateTermAggregationTest extends AbstractAggregationTestCase
1616
{
1717
public function dataProviderForTestFindContentWithAggregation(): iterable
1818
{
19-
$aggregation = new ObjectStateTermAggregation('object_state', 'ez_lock');
19+
$aggregation = new ObjectStateTermAggregation('object_state', 'ibexa_lock');
2020

2121
$builder = new TermAggregationDataSetBuilder($aggregation);
2222
$builder->setExpectedEntries([
@@ -30,7 +30,7 @@ function (string $identifier): ObjectState {
3030

3131
static $objectStateGroup = null;
3232
if ($objectStateGroup === null) {
33-
$objectStateGroup = $objectStateService->loadObjectStateGroupByIdentifier('ez_lock');
33+
$objectStateGroup = $objectStateService->loadObjectStateGroupByIdentifier('ibexa_lock');
3434
}
3535

3636
return $objectStateService->loadObjectStateByIdentifier($objectStateGroup, $identifier);

tests/integration/Core/Repository/SearchServiceTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -827,7 +827,7 @@ public function getContentQuerySearches()
827827
],
828828
[
829829
[
830-
'query' => new Criterion\ObjectStateIdentifier(['not_locked'], 'ez_lock'),
830+
'query' => new Criterion\ObjectStateIdentifier(['not_locked'], 'ibexa_lock'),
831831
'sortClauses' => [new SortClause\ContentId()],
832832
'limit' => 50,
833833
],

tests/integration/Core/Repository/_fixtures/Legacy/data/test_data.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ ibexa_object_state:
33
- { default_language_id: 2, group_id: 2, id: 1, identifier: not_locked, language_mask: 3, priority: 0 }
44
- { default_language_id: 2, group_id: 2, id: 2, identifier: locked, language_mask: 3, priority: 1 }
55
ibexa_object_state_group:
6-
- { default_language_id: 2, id: 2, identifier: ez_lock, language_mask: 3 }
6+
- { default_language_id: 2, id: 2, identifier: ibexa_lock, language_mask: 3 }
77
ibexa_object_state_group_language:
88
- { contentobject_state_group_id: 2, description: '', language_id: 3, name: Lock, real_language_id: 2 }
99
ibexa_object_state_language:

tests/lib/Persistence/Legacy/Content/ObjectState/Gateway/DoctrineDatabaseTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ public function testLoadObjectStateGroupData()
146146
[
147147
'ibexa_object_state_group_default_language_id' => 2,
148148
'ibexa_object_state_group_id' => 2,
149-
'ibexa_object_state_group_identifier' => 'ez_lock',
149+
'ibexa_object_state_group_identifier' => 'ibexa_lock',
150150
'ibexa_object_state_group_language_mask' => 3,
151151
'ibexa_object_state_group_language_description' => '',
152152
'ibexa_object_state_group_language_language_id' => 3,
@@ -162,14 +162,14 @@ public function testLoadObjectStateGroupDataByIdentifier()
162162
{
163163
$gateway = $this->getDatabaseGateway();
164164

165-
$result = $gateway->loadObjectStateGroupDataByIdentifier('ez_lock');
165+
$result = $gateway->loadObjectStateGroupDataByIdentifier('ibexa_lock');
166166

167167
self::assertEquals(
168168
[
169169
[
170170
'ibexa_object_state_group_default_language_id' => 2,
171171
'ibexa_object_state_group_id' => 2,
172-
'ibexa_object_state_group_identifier' => 'ez_lock',
172+
'ibexa_object_state_group_identifier' => 'ibexa_lock',
173173
'ibexa_object_state_group_language_mask' => 3,
174174
'ibexa_object_state_group_language_description' => '',
175175
'ibexa_object_state_group_language_language_id' => 3,
@@ -193,7 +193,7 @@ public function testLoadObjectStateGroupListData()
193193
[
194194
'ibexa_object_state_group_default_language_id' => 2,
195195
'ibexa_object_state_group_id' => 2,
196-
'ibexa_object_state_group_identifier' => 'ez_lock',
196+
'ibexa_object_state_group_identifier' => 'ibexa_lock',
197197
'ibexa_object_state_group_language_mask' => 3,
198198
'ibexa_object_state_group_language_description' => '',
199199
'ibexa_object_state_group_language_language_id' => 3,

tests/lib/Persistence/Legacy/Content/ObjectState/MapperTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ protected function getObjectStateGroupRowsFixture()
153153
[
154154
'ibexa_object_state_group_default_language_id' => 2,
155155
'ibexa_object_state_group_id' => 1,
156-
'ibexa_object_state_group_identifier' => 'ez_lock',
156+
'ibexa_object_state_group_identifier' => 'ibexa_lock',
157157
'ibexa_object_state_group_language_mask' => 3,
158158
'ibexa_object_state_group_language_description' => '',
159159
'ibexa_object_state_group_language_language_id' => 3,
@@ -188,7 +188,7 @@ protected function getObjectStateFixture()
188188
protected function getObjectStateGroupFixture()
189189
{
190190
$group = new Group();
191-
$group->identifier = 'ez_lock';
191+
$group->identifier = 'ibexa_lock';
192192
$group->defaultLanguage = 'eng-US';
193193
$group->languageCodes = ['eng-US'];
194194
$group->name = ['eng-US' => 'Lock'];
@@ -224,7 +224,7 @@ protected function getObjectStateGroupInputStructFixture()
224224
$inputStruct = new InputStruct();
225225

226226
$inputStruct->defaultLanguage = 'eng-US';
227-
$inputStruct->identifier = 'ez_lock';
227+
$inputStruct->identifier = 'ibexa_lock';
228228
$inputStruct->name = ['eng-US' => 'Lock'];
229229
$inputStruct->description = ['eng-US' => ''];
230230

0 commit comments

Comments
 (0)