Remove low-value service delegation tests
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user