feat: Divi tab with REST check, release and withdrawal
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -158,4 +158,31 @@ final class SettingsPageTest extends TestCase
|
||||
|
||||
$page->register();
|
||||
}
|
||||
|
||||
/** @dataProvider diviNotices */
|
||||
public function testDiviNoticesAreShown(string $key, string $class, string $text): void
|
||||
{
|
||||
Functions\when('current_user_can')->justReturn(true);
|
||||
$_GET['lit_mcp_notice'] = $key;
|
||||
|
||||
ob_start();
|
||||
(new SettingsPage([$this->tab('verbindung', 'Verbindung')]))->render();
|
||||
$html = (string) ob_get_clean();
|
||||
|
||||
self::assertStringContainsString('notice-' . $class, $html);
|
||||
self::assertStringContainsString($text, $html);
|
||||
}
|
||||
|
||||
/** @return list<list<string>> */
|
||||
public static function diviNotices(): array
|
||||
{
|
||||
return [
|
||||
['divi_checked', 'success', 'Divi-Prüfung abgeschlossen'],
|
||||
['divi_check_running', 'warning', 'bereits eine Divi-Prüfung'],
|
||||
['divi_released', 'success', 'für LIT MCP freigegeben'],
|
||||
['divi_release_refused', 'error', 'Prüfung erneut ausführen'],
|
||||
['divi_withdrawn', 'success', 'Freigabe zurückgezogen'],
|
||||
['divi_withdraw_failed', 'error', 'keine Freigabe'],
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user