mirror of
https://github.com/Cacti/plugin_monitor.git
synced 2026-10-26 21:17:53 +09:00
getMonitorSound() used __DIR__ . '/sounds/' after the controller moved to includes/, so the sound file was never found and the audio element was never printed. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
20 lines
854 B
PHP
20 lines
854 B
PHP
<?php
|
|
/*
|
|
+-------------------------------------------------------------------------+
|
|
| Copyright (C) 2004-2026 The Cacti Group |
|
|
+-------------------------------------------------------------------------+
|
|
| Cacti: The Complete RRDTool-based Graphing Solution |
|
|
+-------------------------------------------------------------------------+
|
|
*/
|
|
|
|
it('resolves the alert sound against the plugin sounds directory', function () {
|
|
$root = dirname(__DIR__, 2);
|
|
$contents = file_get_contents($root . '/includes/controller.php');
|
|
|
|
expect($contents)->not->toBeFalse();
|
|
expect($contents)->toContain("dirname(__DIR__) . '/sounds/'");
|
|
expect($contents)->not->toContain("__DIR__ . '/sounds/'");
|
|
expect(is_dir($root . '/sounds'))->toBeTrue();
|
|
expect(is_dir($root . '/includes/sounds'))->toBeFalse();
|
|
});
|