Skip to content

Commit e75be0d

Browse files
authored
Merge pull request #371 from iMattPro/copy-rules
Add full test coverage
2 parents fda99e8 + 3d6264f commit e75be0d

9 files changed

Lines changed: 1156 additions & 0 deletions

File tree

‎tests/acp/boardrules_module_test.php‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,19 @@ public function test_settings_mode(): void
8282
$this->executeModeAndAssert('settings', self::TEMPLATE_SETTINGS, 'ACP_BOARDRULES_SETTINGS');
8383
}
8484

85+
public function test_settings_mode_sends_requested_notification(): void
86+
{
87+
$this->setupLanguageExpectation();
88+
$this->setupNotificationRequest(true);
89+
$this->request->method('variable')->willReturnCallback(function ($name, $default) {
90+
return $name === 'rule_id' ? 27 : $default;
91+
});
92+
$this->admin_controller->expects($this->once())->method('send_notification')->with(27);
93+
$this->admin_controller->expects($this->once())->method('display_options');
94+
95+
$this->executeModeAndAssert('settings', self::TEMPLATE_SETTINGS, 'ACP_BOARDRULES_SETTINGS');
96+
}
97+
8598
public function test_manage_mode_with_empty_language(): void
8699
{
87100
$this->setupLanguageExpectation();

0 commit comments

Comments
 (0)