refactor(bookmarks): remove factory chain, interfaces, and duplicated sort logic
Remove BookmarkRepositoryFactory, BookmarkServicesFactory, and all 3 repository interfaces — single-consumer abstractions with no polymorphism. Simplify container registrar to wire directly. Extract duplicated updateSortOrders() (60 identical lines in two repos) into SortOrderTrait. Consolidate icon labels from template into BookmarkService::allowedGroupIconLabels() single source of truth. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -4,18 +4,23 @@ namespace MintyPHP\Module\Bookmarks;
|
||||
|
||||
use MintyPHP\App\AppContainer;
|
||||
use MintyPHP\App\Container\ContainerRegistrar;
|
||||
use MintyPHP\Module\Bookmarks\Service\BookmarkRepositoryFactory;
|
||||
use MintyPHP\Module\Bookmarks\Repository\BookmarkGroupRepository;
|
||||
use MintyPHP\Module\Bookmarks\Repository\BookmarkNavigationRepository;
|
||||
use MintyPHP\Module\Bookmarks\Repository\BookmarkRepository;
|
||||
use MintyPHP\Module\Bookmarks\Service\BookmarkService;
|
||||
use MintyPHP\Module\Bookmarks\Service\BookmarkServicesFactory;
|
||||
|
||||
final class BookmarksContainerRegistrar implements ContainerRegistrar
|
||||
{
|
||||
public function register(AppContainer $container): void
|
||||
{
|
||||
$container->set(BookmarkRepositoryFactory::class, static fn (): BookmarkRepositoryFactory => new BookmarkRepositoryFactory());
|
||||
$container->set(BookmarkServicesFactory::class, static fn (AppContainer $c): BookmarkServicesFactory => new BookmarkServicesFactory(
|
||||
$c->get(BookmarkRepositoryFactory::class)
|
||||
$container->set(BookmarkRepository::class, static fn (): BookmarkRepository => new BookmarkRepository());
|
||||
$container->set(BookmarkGroupRepository::class, static fn (): BookmarkGroupRepository => new BookmarkGroupRepository());
|
||||
$container->set(BookmarkNavigationRepository::class, static fn (): BookmarkNavigationRepository => new BookmarkNavigationRepository());
|
||||
|
||||
$container->set(BookmarkService::class, static fn (AppContainer $c): BookmarkService => new BookmarkService(
|
||||
$c->get(BookmarkRepository::class),
|
||||
$c->get(BookmarkGroupRepository::class),
|
||||
$c->get(BookmarkNavigationRepository::class)
|
||||
));
|
||||
$container->set(BookmarkService::class, static fn (AppContainer $c): BookmarkService => $c->get(BookmarkServicesFactory::class)->createBookmarkService());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,8 +6,15 @@ use MintyPHP\DB;
|
||||
use MintyPHP\Repository\Support\RepoQuery;
|
||||
use MintyPHP\Repository\Support\RepositoryArrayHelper;
|
||||
|
||||
class BookmarkGroupRepository implements BookmarkGroupRepositoryInterface
|
||||
class BookmarkGroupRepository
|
||||
{
|
||||
use SortOrderTrait;
|
||||
|
||||
protected function sortOrderTableName(): string
|
||||
{
|
||||
return 'user_bookmark_groups';
|
||||
}
|
||||
|
||||
private function unwrapList(mixed $rows): array
|
||||
{
|
||||
return RepositoryArrayHelper::unwrapList($rows, 'user_bookmark_groups');
|
||||
@@ -125,66 +132,4 @@ class BookmarkGroupRepository implements BookmarkGroupRepositoryInterface
|
||||
return $deleted !== false && (int) $deleted > 0;
|
||||
}
|
||||
|
||||
public function updateSortOrders(int $userId, array $idOrderPairs): bool
|
||||
{
|
||||
if ($userId <= 0 || $idOrderPairs === []) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$idList = [];
|
||||
foreach ($idOrderPairs as $pair) {
|
||||
$id = (int) $pair['id'];
|
||||
if ($id <= 0) {
|
||||
return false;
|
||||
}
|
||||
$idList[] = $id;
|
||||
}
|
||||
$idList = array_values(array_unique($idList));
|
||||
|
||||
$existingCount = DB::selectValue(
|
||||
'select count(*) from user_bookmark_groups where user_id = ? and id in (???)',
|
||||
(string) $userId,
|
||||
array_map('strval', $idList)
|
||||
);
|
||||
|
||||
if ((int) $existingCount !== count($idList)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$db = DB::handle();
|
||||
try {
|
||||
$db->begin_transaction();
|
||||
|
||||
foreach ($idOrderPairs as $pair) {
|
||||
$id = (int) $pair['id'];
|
||||
$sortOrder = (int) $pair['sort_order'];
|
||||
if ($id <= 0 || $sortOrder <= 0) {
|
||||
$db->rollback();
|
||||
return false;
|
||||
}
|
||||
|
||||
$updated = DB::update(
|
||||
'update user_bookmark_groups set sort_order = ? where id = ? and user_id = ?',
|
||||
(string) $sortOrder,
|
||||
(string) $id,
|
||||
(string) $userId
|
||||
);
|
||||
|
||||
if ($updated === false) {
|
||||
$db->rollback();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
$db->commit();
|
||||
return true;
|
||||
} catch (\Throwable) {
|
||||
try {
|
||||
$db->rollback();
|
||||
} catch (\Throwable) {
|
||||
// no-op
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace MintyPHP\Module\Bookmarks\Repository;
|
||||
|
||||
interface BookmarkGroupRepositoryInterface
|
||||
{
|
||||
/**
|
||||
* @param array{limit?: int, offset?: int} $options
|
||||
* @return list<array<string, mixed>>
|
||||
*/
|
||||
public function listByUser(int $userId, array $options = []): array;
|
||||
|
||||
public function countByUser(int $userId): int;
|
||||
|
||||
/** @return array<string, mixed>|false */
|
||||
public function findById(int $id, int $userId): array|false;
|
||||
|
||||
public function create(array $data): int|false;
|
||||
|
||||
public function update(int $id, int $userId, array $data): bool;
|
||||
|
||||
public function delete(int $id, int $userId): bool;
|
||||
|
||||
/** @param list<array{id: int, sort_order: int}> $idOrderPairs */
|
||||
public function updateSortOrders(int $userId, array $idOrderPairs): bool;
|
||||
}
|
||||
@@ -4,7 +4,7 @@ namespace MintyPHP\Module\Bookmarks\Repository;
|
||||
|
||||
use MintyPHP\DB;
|
||||
|
||||
class BookmarkNavigationRepository implements BookmarkNavigationRepositoryInterface
|
||||
class BookmarkNavigationRepository
|
||||
{
|
||||
public function nextRootSortOrder(int $userId): int
|
||||
{
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace MintyPHP\Module\Bookmarks\Repository;
|
||||
|
||||
interface BookmarkNavigationRepositoryInterface
|
||||
{
|
||||
public function nextRootSortOrder(int $userId): int;
|
||||
|
||||
/** @param list<array{kind: 'group'|'bookmark', id: int, sort_order: int}> $rootOrderPairs */
|
||||
public function updateRootSortOrders(int $userId, array $rootOrderPairs): bool;
|
||||
}
|
||||
@@ -6,8 +6,15 @@ use MintyPHP\DB;
|
||||
use MintyPHP\Repository\Support\RepoQuery;
|
||||
use MintyPHP\Repository\Support\RepositoryArrayHelper;
|
||||
|
||||
class BookmarkRepository implements BookmarkRepositoryInterface
|
||||
class BookmarkRepository
|
||||
{
|
||||
use SortOrderTrait;
|
||||
|
||||
protected function sortOrderTableName(): string
|
||||
{
|
||||
return 'user_bookmarks';
|
||||
}
|
||||
|
||||
private function unwrapList(mixed $rows): array
|
||||
{
|
||||
return RepositoryArrayHelper::unwrapList($rows, 'user_bookmarks');
|
||||
@@ -182,68 +189,6 @@ class BookmarkRepository implements BookmarkRepositoryInterface
|
||||
return $deleted !== false && (int) $deleted > 0;
|
||||
}
|
||||
|
||||
public function updateSortOrders(int $userId, array $idOrderPairs): bool
|
||||
{
|
||||
if ($userId <= 0 || $idOrderPairs === []) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$idList = [];
|
||||
foreach ($idOrderPairs as $pair) {
|
||||
$id = (int) $pair['id'];
|
||||
if ($id <= 0) {
|
||||
return false;
|
||||
}
|
||||
$idList[] = $id;
|
||||
}
|
||||
$idList = array_values(array_unique($idList));
|
||||
|
||||
$existingCount = DB::selectValue(
|
||||
'select count(*) from user_bookmarks where user_id = ? and id in (???)',
|
||||
(string) $userId,
|
||||
array_map('strval', $idList)
|
||||
);
|
||||
|
||||
if ((int) $existingCount !== count($idList)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$db = DB::handle();
|
||||
try {
|
||||
$db->begin_transaction();
|
||||
|
||||
foreach ($idOrderPairs as $pair) {
|
||||
$id = (int) $pair['id'];
|
||||
$sortOrder = (int) $pair['sort_order'];
|
||||
if ($id <= 0 || $sortOrder <= 0) {
|
||||
$db->rollback();
|
||||
return false;
|
||||
}
|
||||
|
||||
$updated = DB::update(
|
||||
'update user_bookmarks set sort_order = ? where id = ? and user_id = ?',
|
||||
(string) $sortOrder,
|
||||
(string) $id,
|
||||
(string) $userId
|
||||
);
|
||||
if ($updated === false) {
|
||||
$db->rollback();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
$db->commit();
|
||||
return true;
|
||||
} catch (\Throwable) {
|
||||
try {
|
||||
$db->rollback();
|
||||
} catch (\Throwable) {
|
||||
// no-op
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/** @return list<array<string, mixed>> */
|
||||
public function listByGroup(int $userId, int $groupId): array
|
||||
{
|
||||
|
||||
@@ -1,36 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace MintyPHP\Module\Bookmarks\Repository;
|
||||
|
||||
interface BookmarkRepositoryInterface
|
||||
{
|
||||
/**
|
||||
* @param array{limit?: int, offset?: int} $options
|
||||
* @return list<array<string, mixed>>
|
||||
*/
|
||||
public function listByUser(int $userId, array $options = []): array;
|
||||
|
||||
public function nextBookmarkSortOrder(int $userId, ?int $groupId): int;
|
||||
|
||||
public function countByUser(int $userId): int;
|
||||
|
||||
/** @return array<string, mixed>|false */
|
||||
public function findById(int $id, int $userId): array|false;
|
||||
|
||||
/** @return array<string, mixed>|false */
|
||||
public function findByUserAndUrl(int $userId, string $url): array|false;
|
||||
|
||||
public function create(array $data): int|false;
|
||||
|
||||
public function update(int $id, int $userId, array $data): bool;
|
||||
|
||||
public function delete(int $id, int $userId): bool;
|
||||
|
||||
/** @param list<array{id: int, sort_order: int}> $idOrderPairs */
|
||||
public function updateSortOrders(int $userId, array $idOrderPairs): bool;
|
||||
|
||||
/** @return list<array<string, mixed>> */
|
||||
public function listByGroup(int $userId, int $groupId): array;
|
||||
|
||||
public function unsetGroupId(int $bookmarkId, int $userId, int $sortOrder): bool;
|
||||
}
|
||||
@@ -0,0 +1,75 @@
|
||||
<?php
|
||||
|
||||
namespace MintyPHP\Module\Bookmarks\Repository;
|
||||
|
||||
use MintyPHP\DB;
|
||||
|
||||
trait SortOrderTrait
|
||||
{
|
||||
abstract protected function sortOrderTableName(): string;
|
||||
|
||||
/** @param list<array{id: int, sort_order: int}> $idOrderPairs */
|
||||
public function updateSortOrders(int $userId, array $idOrderPairs): bool
|
||||
{
|
||||
if ($userId <= 0 || $idOrderPairs === []) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$idList = [];
|
||||
foreach ($idOrderPairs as $pair) {
|
||||
$id = (int) $pair['id'];
|
||||
if ($id <= 0) {
|
||||
return false;
|
||||
}
|
||||
$idList[] = $id;
|
||||
}
|
||||
$idList = array_values(array_unique($idList));
|
||||
|
||||
$table = $this->sortOrderTableName();
|
||||
|
||||
$existingCount = DB::selectValue(
|
||||
'select count(*) from ' . $table . ' where user_id = ? and id in (???)',
|
||||
(string) $userId,
|
||||
array_map('strval', $idList)
|
||||
);
|
||||
|
||||
if ((int) $existingCount !== count($idList)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$db = DB::handle();
|
||||
try {
|
||||
$db->begin_transaction();
|
||||
|
||||
foreach ($idOrderPairs as $pair) {
|
||||
$id = (int) $pair['id'];
|
||||
$sortOrder = (int) $pair['sort_order'];
|
||||
if ($id <= 0 || $sortOrder <= 0) {
|
||||
$db->rollback();
|
||||
return false;
|
||||
}
|
||||
|
||||
$updated = DB::update(
|
||||
'update ' . $table . ' set sort_order = ? where id = ? and user_id = ?',
|
||||
(string) $sortOrder,
|
||||
(string) $id,
|
||||
(string) $userId
|
||||
);
|
||||
if ($updated === false) {
|
||||
$db->rollback();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
$db->commit();
|
||||
return true;
|
||||
} catch (\Throwable) {
|
||||
try {
|
||||
$db->rollback();
|
||||
} catch (\Throwable) {
|
||||
// no-op
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,32 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace MintyPHP\Module\Bookmarks\Service;
|
||||
|
||||
use MintyPHP\Module\Bookmarks\Repository\BookmarkGroupRepository;
|
||||
use MintyPHP\Module\Bookmarks\Repository\BookmarkGroupRepositoryInterface;
|
||||
use MintyPHP\Module\Bookmarks\Repository\BookmarkNavigationRepository;
|
||||
use MintyPHP\Module\Bookmarks\Repository\BookmarkNavigationRepositoryInterface;
|
||||
use MintyPHP\Module\Bookmarks\Repository\BookmarkRepository;
|
||||
use MintyPHP\Module\Bookmarks\Repository\BookmarkRepositoryInterface;
|
||||
|
||||
class BookmarkRepositoryFactory
|
||||
{
|
||||
private ?BookmarkRepository $bookmarkRepository = null;
|
||||
private ?BookmarkGroupRepository $groupRepository = null;
|
||||
private ?BookmarkNavigationRepository $navigationRepository = null;
|
||||
|
||||
public function createBookmarkRepository(): BookmarkRepositoryInterface
|
||||
{
|
||||
return $this->bookmarkRepository ??= new BookmarkRepository();
|
||||
}
|
||||
|
||||
public function createBookmarkGroupRepository(): BookmarkGroupRepositoryInterface
|
||||
{
|
||||
return $this->groupRepository ??= new BookmarkGroupRepository();
|
||||
}
|
||||
|
||||
public function createBookmarkNavigationRepository(): BookmarkNavigationRepositoryInterface
|
||||
{
|
||||
return $this->navigationRepository ??= new BookmarkNavigationRepository();
|
||||
}
|
||||
}
|
||||
@@ -2,9 +2,9 @@
|
||||
|
||||
namespace MintyPHP\Module\Bookmarks\Service;
|
||||
|
||||
use MintyPHP\Module\Bookmarks\Repository\BookmarkGroupRepositoryInterface;
|
||||
use MintyPHP\Module\Bookmarks\Repository\BookmarkNavigationRepositoryInterface;
|
||||
use MintyPHP\Module\Bookmarks\Repository\BookmarkRepositoryInterface;
|
||||
use MintyPHP\Module\Bookmarks\Repository\BookmarkGroupRepository;
|
||||
use MintyPHP\Module\Bookmarks\Repository\BookmarkNavigationRepository;
|
||||
use MintyPHP\Module\Bookmarks\Repository\BookmarkRepository;
|
||||
use MintyPHP\Module\Bookmarks\Support\BookmarkUrlNormalizer;
|
||||
|
||||
class BookmarkService
|
||||
@@ -23,9 +23,9 @@ class BookmarkService
|
||||
];
|
||||
|
||||
public function __construct(
|
||||
private readonly BookmarkRepositoryInterface $bookmarkRepository,
|
||||
private readonly BookmarkGroupRepositoryInterface $groupRepository,
|
||||
private readonly BookmarkNavigationRepositoryInterface $navigationRepository
|
||||
private readonly BookmarkRepository $bookmarkRepository,
|
||||
private readonly BookmarkGroupRepository $groupRepository,
|
||||
private readonly BookmarkNavigationRepository $navigationRepository
|
||||
) {
|
||||
}
|
||||
|
||||
@@ -35,6 +35,33 @@ class BookmarkService
|
||||
return self::ALLOWED_GROUP_ICONS;
|
||||
}
|
||||
|
||||
/** @return array<string, string> icon class => translated label */
|
||||
public static function allowedGroupIconLabels(): array
|
||||
{
|
||||
return [
|
||||
'bi-house' => t('Icon: Home'),
|
||||
'bi-people' => t('Icon: People'),
|
||||
'bi-person' => t('Icon: Person'),
|
||||
'bi-folder' => t('Icon: Folder'),
|
||||
'bi-file-text' => t('Icon: Document'),
|
||||
'bi-gear' => t('Icon: Settings'),
|
||||
'bi-shield-lock' => t('Icon: Security'),
|
||||
'bi-bar-chart' => t('Icon: Chart'),
|
||||
'bi-envelope' => t('Icon: Mail'),
|
||||
'bi-calendar' => t('Icon: Calendar'),
|
||||
'bi-clock' => t('Icon: Clock'),
|
||||
'bi-star' => t('Icon: Star'),
|
||||
'bi-heart' => t('Icon: Heart'),
|
||||
'bi-flag' => t('Icon: Flag'),
|
||||
'bi-bookmark' => t('Icon: Bookmark'),
|
||||
'bi-pin-map' => t('Icon: Location'),
|
||||
'bi-lightning' => t('Icon: Lightning'),
|
||||
'bi-database' => t('Icon: Database'),
|
||||
'bi-globe' => t('Icon: Globe'),
|
||||
'bi-code-slash' => t('Icon: Code'),
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array{groups: list<array<string, mixed>>, ungrouped: list<array<string, mixed>>}
|
||||
*/
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace MintyPHP\Module\Bookmarks\Service;
|
||||
|
||||
class BookmarkServicesFactory
|
||||
{
|
||||
private ?BookmarkService $bookmarkService = null;
|
||||
|
||||
public function __construct(
|
||||
private readonly BookmarkRepositoryFactory $bookmarkRepositoryFactory
|
||||
) {
|
||||
}
|
||||
|
||||
public function createBookmarkService(): BookmarkService
|
||||
{
|
||||
return $this->bookmarkService ??= new BookmarkService(
|
||||
$this->bookmarkRepositoryFactory->createBookmarkRepository(),
|
||||
$this->bookmarkRepositoryFactory->createBookmarkGroupRepository(),
|
||||
$this->bookmarkRepositoryFactory->createBookmarkNavigationRepository()
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -7,29 +7,7 @@ $bookmarkNav = is_array($layoutNav['bookmarks.nav'] ?? null) ? $layoutNav['bookm
|
||||
$bookmarkData = is_array($bookmarkNav['grouped'] ?? null) ? $bookmarkNav['grouped'] : [];
|
||||
$bookmarkGroups = is_array($bookmarkData['groups'] ?? null) ? $bookmarkData['groups'] : [];
|
||||
|
||||
// Human-readable icon labels — keep in sync with BookmarkService::ALLOWED_GROUP_ICONS
|
||||
$iconLabels = [
|
||||
'bi-house' => t('Icon: Home'),
|
||||
'bi-people' => t('Icon: People'),
|
||||
'bi-person' => t('Icon: Person'),
|
||||
'bi-folder' => t('Icon: Folder'),
|
||||
'bi-file-text' => t('Icon: Document'),
|
||||
'bi-gear' => t('Icon: Settings'),
|
||||
'bi-shield-lock' => t('Icon: Security'),
|
||||
'bi-bar-chart' => t('Icon: Chart'),
|
||||
'bi-envelope' => t('Icon: Mail'),
|
||||
'bi-calendar' => t('Icon: Calendar'),
|
||||
'bi-clock' => t('Icon: Clock'),
|
||||
'bi-star' => t('Icon: Star'),
|
||||
'bi-heart' => t('Icon: Heart'),
|
||||
'bi-flag' => t('Icon: Flag'),
|
||||
'bi-bookmark' => t('Icon: Bookmark'),
|
||||
'bi-pin-map' => t('Icon: Location'),
|
||||
'bi-lightning' => t('Icon: Lightning'),
|
||||
'bi-database' => t('Icon: Database'),
|
||||
'bi-globe' => t('Icon: Globe'),
|
||||
'bi-code-slash' => t('Icon: Code'),
|
||||
];
|
||||
$iconLabels = BookmarkService::allowedGroupIconLabels();
|
||||
?>
|
||||
<dialog
|
||||
data-app-bookmark-dialog
|
||||
|
||||
@@ -2,25 +2,25 @@
|
||||
|
||||
namespace MintyPHP\Tests\Module\Bookmarks\Service;
|
||||
|
||||
use MintyPHP\Module\Bookmarks\Repository\BookmarkGroupRepositoryInterface;
|
||||
use MintyPHP\Module\Bookmarks\Repository\BookmarkNavigationRepositoryInterface;
|
||||
use MintyPHP\Module\Bookmarks\Repository\BookmarkRepositoryInterface;
|
||||
use MintyPHP\Module\Bookmarks\Repository\BookmarkGroupRepository;
|
||||
use MintyPHP\Module\Bookmarks\Repository\BookmarkNavigationRepository;
|
||||
use MintyPHP\Module\Bookmarks\Repository\BookmarkRepository;
|
||||
use MintyPHP\Module\Bookmarks\Service\BookmarkService;
|
||||
use PHPUnit\Framework\MockObject\MockObject;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
class BookmarkServiceTest extends TestCase
|
||||
{
|
||||
private BookmarkRepositoryInterface&MockObject $bookmarkRepo;
|
||||
private BookmarkGroupRepositoryInterface&MockObject $groupRepo;
|
||||
private BookmarkNavigationRepositoryInterface&MockObject $navigationRepo;
|
||||
private BookmarkRepository&MockObject $bookmarkRepo;
|
||||
private BookmarkGroupRepository&MockObject $groupRepo;
|
||||
private BookmarkNavigationRepository&MockObject $navigationRepo;
|
||||
private BookmarkService $service;
|
||||
|
||||
protected function setUp(): void
|
||||
{
|
||||
$this->bookmarkRepo = $this->createMock(BookmarkRepositoryInterface::class);
|
||||
$this->groupRepo = $this->createMock(BookmarkGroupRepositoryInterface::class);
|
||||
$this->navigationRepo = $this->createMock(BookmarkNavigationRepositoryInterface::class);
|
||||
$this->bookmarkRepo = $this->createMock(BookmarkRepository::class);
|
||||
$this->groupRepo = $this->createMock(BookmarkGroupRepository::class);
|
||||
$this->navigationRepo = $this->createMock(BookmarkNavigationRepository::class);
|
||||
$this->service = new BookmarkService($this->bookmarkRepo, $this->groupRepo, $this->navigationRepo);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user