Skip to content

Commit 0336cc2

Browse files
committed
test(dossiq): named arguments in the admin settings factory test
Assisted-by: ClaudeCode:claude-opus-5-5
1 parent 17bd1b2 commit 0336cc2

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

‎tests/Unit/Service/Registrar/BespokeServiceRegistrarTest.php‎

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,7 @@ public function testTheSettingsSectionIsBuilt(): void {
259259
$this->assertInstanceOf(SettingsSection::class, $section);
260260
$this->assertSame('/icon.svg', $section->getIcon());
261261
}//end testTheSettingsSectionIsBuilt()
262+
262263
/**
263264
* The admin settings factory hands the constructor every argument it
264265
* declares, so the admin settings pages build.
@@ -269,16 +270,16 @@ public function testTheAdminSettingsAreBuilt(): void {
269270
$settings = $this->factories[AdminSettings::class](
270271
$this->container(
271272
services: [
272-
'OCP\\App\\IAppManager' => $this->createMock(IAppManager::class),
273-
'OCP\\AppFramework\\Services\\IInitialState' => $this->createMock(IInitialState::class),
274-
'OCA\\Dossiq\\Service\\SettingsService' => $this->createMock(SettingsService::class),
275-
'OCA\\Dossiq\\Service\\Queue\\QueueUrgencySettings' => $this->createMock(QueueUrgencySettingsInterface::class),
273+
'OCP\\App\\IAppManager' => $this->createMock(originalClassName: IAppManager::class),
274+
'OCP\\AppFramework\\Services\\IInitialState' => $this->createMock(originalClassName: IInitialState::class),
275+
'OCA\\Dossiq\\Service\\SettingsService' => $this->createMock(originalClassName: SettingsService::class),
276+
'OCA\\Dossiq\\Service\\Queue\\QueueUrgencySettings' => $this->createMock(originalClassName: QueueUrgencySettingsInterface::class),
276277
'OCP\\ServerVersion' => (new \ReflectionClass(ServerVersion::class))->newInstanceWithoutConstructor(),
277-
'OCA\\Dossiq\\Kernel\\Contracts\\PackageAdminTabsInterface' => $this->createMock(PackageAdminTabsInterface::class),
278+
'OCA\\Dossiq\\Kernel\\Contracts\\PackageAdminTabsInterface' => $this->createMock(originalClassName: PackageAdminTabsInterface::class),
278279
]
279280
)
280281
);
281282

282-
$this->assertInstanceOf(AdminSettings::class, $settings);
283+
$this->assertInstanceOf(expected: AdminSettings::class, actual: $settings);
283284
}//end testTheAdminSettingsAreBuilt()
284285
}//end class

0 commit comments

Comments
 (0)