Skip to content

Commit

Permalink
Move from helper to Repository namespace + unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ViniTou committed Oct 31, 2024
1 parent 634b972 commit b16abf8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/lib/Repository/ContentService/RelationListFacade.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ public function getRelations(VersionInfo $versionInfo): iterable
foreach ($relationListIterator as $relationListItem) {
if ($relationListItem->hasRelation()) {
/** @var \Ibexa\Contracts\Core\Repository\Values\Content\Relation $relation */
yield $relationListItem->getRelation();
$relation = $relationListItem->getRelation();
yield $relation;
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,16 @@
use Ibexa\Contracts\Core\Repository\Values\Content\RelationList\RelationListItemInterface;
use Ibexa\Contracts\Core\Repository\Values\Content\VersionInfo;
use Ibexa\Core\Repository\ContentService\RelationListFacade;
use PHPUnit\Framework\MockObject\MockObject;
use PHPUnit\Framework\TestCase;

final class RelationListFacadeTest extends TestCase
{
private ContentService $contentService;
private ContentService&MockObject $contentService;

private RelationListFacade $relationListFacade;

private VersionInfo $versionInfo;
private VersionInfo&MockObject $versionInfo;

protected function setUp(): void
{
Expand Down

0 comments on commit b16abf8

Please sign in to comment.