Remove low-value service delegation tests

This commit is contained in:
2026-03-19 19:46:07 +01:00
parent 5c7a1148ac
commit c89501bbed
2 changed files with 0 additions and 50 deletions

View File

@@ -169,40 +169,6 @@ class PermissionServiceTest extends TestCase
// ── Delegation methods ───────────────────────────────────────────
public function testListDelegatesToRepository(): void
{
$expected = [['id' => 1, 'key' => 'a']];
$this->permissionRepository->expects($this->any())->method('list')->willReturn($expected);
$this->assertSame($expected, $this->service->list());
}
public function testListActiveDelegatesToRepository(): void
{
$expected = [['id' => 2, 'key' => 'b', 'active' => 1]];
$this->permissionRepository->expects($this->any())->method('listActive')->willReturn($expected);
$this->assertSame($expected, $this->service->listActive());
}
public function testListPagedDelegatesToRepository(): void
{
$options = ['page' => 1, 'limit' => 10];
$expected = ['rows' => [], 'total' => 0];
$this->permissionRepository->expects($this->any())->method('listPaged')->with($options)->willReturn($expected);
$this->assertSame($expected, $this->service->listPaged($options));
}
public function testFindDelegatesToRepository(): void
{
$this->permissionRepository->expects($this->any())->method('find')->with(5)->willReturn(['id' => 5, 'key' => 'x']);
$this->assertSame(['id' => 5, 'key' => 'x'], $this->service->find(5));
}
public function testFindByKeyDelegatesToRepository(): void
{
$this->permissionRepository->expects($this->any())->method('findByKey')->with('users.view')->willReturn(['id' => 1, 'key' => 'users.view']);
$this->assertSame(['id' => 1, 'key' => 'users.view'], $this->service->findByKey('users.view'));
}
// ── createFromAdmin ──────────────────────────────────────────────
public function testCreateFromAdminSucceeds(): void

View File

@@ -33,22 +33,6 @@ class TenantServiceTest extends TestCase
);
}
public function testListDelegatesToRepository(): void
{
$expected = [
['id' => 1, 'description' => 'Tenant A'],
['id' => 2, 'description' => 'Tenant B'],
];
$this->tenantRepository->expects($this->once())
->method('list')
->willReturn($expected);
$result = $this->service->list();
self::assertSame($expected, $result);
}
public function testCreateFromAdminSucceeds(): void
{
$input = $this->validInput();