feat(v3.3.0): enterprise presets, badges, notifications, rule controller, watch mode, offline healer, and WCAG 2.2 ruleset

This commit is contained in:
Enes Yakıştır
2026-09-12 10:12:05 +03:00
parent 2de1f34878
commit ef8ccb9f75
43 changed files with 2598 additions and 81 deletions
@@ -0,0 +1,37 @@
<?php
namespace YakNet\AccessibilityConsole\Tests\Notifications;
use PHPUnit\Framework\TestCase;
use YakNet\AccessibilityConsole\Notifications\NotificationDispatcher;
use YakNet\AccessibilityConsole\Notifications\NotificationPayload;
use YakNet\AccessibilityConsole\Notifications\NotifierInterface;
class NotificationDispatcherTest extends TestCase
{
public function testDispatchToMultipleNotifiers(): void
{
$dispatcher = new NotificationDispatcher();
$mockSlack = $this->createMock(NotifierInterface::class);
$mockSlack->expects($this->once())
->method('send')
->willReturn(true);
$mockDiscord = $this->createMock(NotifierInterface::class);
$mockDiscord->expects($this->once())
->method('send')
->willReturn(true);
$dispatcher->addNotifier('slack', $mockSlack);
$dispatcher->addNotifier('discord', $mockDiscord);
$this->assertTrue($dispatcher->hasNotifiers());
$payload = new NotificationPayload('https://example.com', 95, 2, 0, 2);
$results = $dispatcher->dispatch($payload);
$this->assertTrue($results['slack']);
$this->assertTrue($results['discord']);
}
}