release: v3.1.0 premium smart core engines and 14 new accessibility rules

This commit is contained in:
Enes Yakıştır
2026-07-13 10:54:25 +03:00
parent 7f3bf3cb7d
commit 5292c2c865
67 changed files with 2639 additions and 29 deletions
+29
View File
@@ -0,0 +1,29 @@
<?php
namespace YakNet\AccessibilityConsole\Tests\Rules;
use PHPUnit\Framework\TestCase;
use YakNet\AccessibilityConsole\Core\Scanner;
use YakNet\AccessibilityConsole\Rules\LinkTextUrl;
class LinkTextUrlTest extends TestCase
{
public function testFlagsLinkWithRawUrlText(): void
{
$scanner = new Scanner();
$scanner->addRule(new LinkTextUrl());
$violations = $scanner->scan('<div><a href="https://google.com">https://google.com</a></div>');
$this->assertCount(1, $violations);
$this->assertSame('WCAG_2_4_4_LINK_URL', $violations[0]->ruleId);
}
public function testPassesDescriptiveLinkText(): void
{
$scanner = new Scanner();
$scanner->addRule(new LinkTextUrl());
$violations = $scanner->scan('<div><a href="https://google.com">Google Search Engine</a></div>');
$this->assertCount(0, $violations);
}
}