Git Komut Rehberi & Terminal Asistanı
Sıfırdan Yeni Bir Depo Başlatın:
Mevcut Bir Git Deposu veya Klasörü Gönderin:
Hataları Geri Alma, İptal & Temizlik:
Son commit'i geri al (yapılan değişiklikleri korur):
git reset --soft HEAD~1
Yapılan yerel değişiklikleri iptal et (çalışma ağacını temizler):
git restore .
Takip edilmeyen gereksiz dosyaları sil:
git clean -fd
Değişiklikleri geçici sakla ve geri getir (stash):
git stash git stash pop
Dal (Branch) ve Sürüm Etiketleri:
Yeni dal aç ve geçiş yap:
git checkout -b yeni-ozellik git push -u origin yeni-ozellik
Sürüm etiketi (tag) oluştur ve gönder:
git tag -a v1.0.0 -m "Sürüm 1.0.0" git push origin --tags
32 lines
1.2 KiB
PHP
32 lines
1.2 KiB
PHP
<?php
|
|
|
|
namespace YakNet\AccessibilityConsole\Tests\Rules;
|
|
|
|
use PHPUnit\Framework\TestCase;
|
|
use YakNet\AccessibilityConsole\Core\Scanner;
|
|
use YakNet\AccessibilityConsole\Rules\ColorBlindnessContrast;
|
|
|
|
class ColorBlindnessContrastTest extends TestCase
|
|
{
|
|
public function testFlagsLowContrastUnderColorBlindnessSimulation(): void
|
|
{
|
|
$scanner = new Scanner();
|
|
$scanner->addRule(new ColorBlindnessContrast());
|
|
|
|
// Red text #ff0000 on Green background #00ff00 (Classic red/green colorblindness issue)
|
|
$violations = $scanner->scan('<div style="color: #ff0000; background-color: #00ff00;">Red on Green text</div>');
|
|
$this->assertGreaterThanOrEqual(1, count($violations));
|
|
$this->assertSame('WCAG_1_4_1_COLOR_BLINDNESS_CONTRAST', $violations[0]->ruleId);
|
|
}
|
|
|
|
public function testPassesHighContrastUnderColorBlindnessSimulation(): void
|
|
{
|
|
$scanner = new Scanner();
|
|
$scanner->addRule(new ColorBlindnessContrast());
|
|
|
|
// Black text #000000 on White background #ffffff
|
|
$violations = $scanner->scan('<div style="color: #000000; background-color: #ffffff;">Black on White text</div>');
|
|
$this->assertCount(0, $violations);
|
|
}
|
|
}
|