Skip to content

Commit

Permalink
Merge branch '6.13' into 7.0
Browse files Browse the repository at this point in the history
  • Loading branch information
andrerom committed Jan 24, 2018
2 parents 7207697 + 5a9ac49 commit dd7a069
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 8 deletions.
2 changes: 1 addition & 1 deletion composer.json
Expand Up @@ -2,7 +2,7 @@
"name": "ezsystems/ezpublish-kernel",
"description": "Kernel used by ezsystems/ezplatform and derivatives. Provides the Content Repository, its APIs, and the application's Symfony framework integration.",
"homepage": "https://ezplatform.com",
"license": "GPL-2.0",
"license": "GPL-2.0-only",
"suggest": {
"php-64bit": "For support of more than 30 languages, a 64bit php installation on all involved prod/dev machines is required"
},
Expand Down
36 changes: 30 additions & 6 deletions eZ/Publish/Core/SignalSlot/Tests/TrashServiceTest.php
Expand Up @@ -31,27 +31,39 @@ protected function getSignalSlotService($coreService, SignalDispatcher $dispatch

public function serviceProvider()
{
$rootId = 2;
$newParentLocationId = 2;
$trashItemId = $locationId = 60;
$trashItemContentInfo = $this->getContentInfo(59, md5('trash'));
$trashItemParentLocationId = 17;

$trashItem = new TrashItem(
array(
'id' => $trashItemId,
'contentInfo' => $trashItemContentInfo,
'parentLocationId' => $trashItemParentLocationId,
)
);

$newParentLocation = new Location(
array(
'id' => $newParentLocationId,
'contentInfo' => $this->getContentInfo(53, md5('root')),
)
);

$location = new Location(
array(
'id' => $locationId,
'contentInfo' => $trashItemContentInfo,
'parentLocationId' => $trashItemParentLocationId,
)
);
$root = new Location(

$locationWithNewParent = new Location(
array(
'id' => $rootId,
'contentInfo' => $this->getContentInfo(53, md5('root')),
'id' => $locationId,
'contentInfo' => $trashItemContentInfo,
'parentLocationId' => $newParentLocationId,
)
);

Expand All @@ -72,13 +84,25 @@ public function serviceProvider()
),
array(
'recover',
array($trashItem, $root),
array($trashItem, $newParentLocation),
$locationWithNewParent,
1,
'eZ\Publish\Core\SignalSlot\Signal\TrashService\RecoverSignal',
array(
'trashItemId' => $trashItemId,
'newParentLocationId' => $newParentLocationId,
'newLocationId' => $locationId,
),
),
array(
'recover',
array($trashItem, null),
$location,
1,
TrashServiceSignals\RecoverSignal::class,
array(
'trashItemId' => $trashItemId,
'newParentLocationId' => $rootId,
'newParentLocationId' => $trashItemParentLocationId,
'newLocationId' => $locationId,
),
),
Expand Down
2 changes: 1 addition & 1 deletion eZ/Publish/Core/SignalSlot/TrashService.php
Expand Up @@ -117,7 +117,7 @@ public function recover(TrashItem $trashItem, Location $newParentLocation = null
array(
'trashItemId' => $trashItem->id,
'contentId' => $trashItem->contentId,
'newParentLocationId' => $newParentLocation !== null ? $newParentLocation->id : null,
'newParentLocationId' => $newLocation->parentLocationId,
'newLocationId' => $newLocation->id,
)
)
Expand Down

0 comments on commit dd7a069

Please sign in to comment.