Skip to content

Commit

Permalink
OXDEV-7325: Correct test names and add type hints; Remove unnecessary…
Browse files Browse the repository at this point in the history
… usages;
  • Loading branch information
MarcelOxid committed Dec 6, 2023
1 parent d6caf99 commit 96382d6
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions tests/Unit/Infrastructure/ThemeSettingRepositorySettersTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,16 @@ public function testSetterThrowsExceptionOnNotExistingSetting(
$name = 'notExistingSetting';
$themeId = 'awesomeTheme';

$repository = $this->getSut(methods: [$checkMethod]);
$repository->method($checkMethod)
$sut = $this->getSut(methods: [$checkMethod, 'saveSettingValue']);
$sut->method($checkMethod)
->with($name, $themeId)
->willThrowException(new NoSettingsFoundForThemeException($themeId));
$sut->expects($this->never())
->method('saveSettingValue');

$this->expectException(NoSettingsFoundForThemeException::class);

$repository->$repositoryMethod($name, $value, $themeId);
$sut->$repositoryMethod($name, $value, $themeId);
}

public function notExistingSettingCheckTriggerDataProvider(): \Generator
Expand All @@ -47,7 +49,7 @@ public function notExistingSettingCheckTriggerDataProvider(): \Generator
yield "saveFloatSetting" => [
'checkMethod' => 'getFloat',
'repositoryMethod' => 'saveFloatSetting',
'value' => 1_23
'value' => 1.23
];
yield "saveBooleanSetting" => [
'checkMethod' => 'getBoolean',
Expand Down

0 comments on commit 96382d6

Please sign in to comment.