Skip to content

Commit 444487b

Browse files
committed
Add bogus tests
We need the results before changing the function
1 parent edfe7b3 commit 444487b

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

webapp/tests/Unit/Utils/UtilsTest.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -356,6 +356,19 @@ public function testConvertToHexUnknown(): void
356356
self::assertNull(Utils::convertToHex('#12346h'));
357357
}
358358

359+
public function testApcaContrast(): void
360+
{
361+
self::assertEquals('#ffffff', Utils::apcaContrast("#fff", "#fff"));
362+
}
363+
public function testHexToForegroundAndBorder(): void
364+
{
365+
self::assertEquals(['#ffffff', '#ffffff'], Utils::hexToForegroundAndBorder("#fff"));
366+
self::assertEquals(['#ffffff', '#ffffff'], Utils::hexToForegroundAndBorder("#fedc"));
367+
self::assertEquals(['#ffffff', '#ffffff'], Utils::hexToForegroundAndBorder("#001122"));
368+
self::assertEquals(['#ffffff', '#ffffff'], Utils::hexToForegroundAndBorder("#11223344"));
369+
self::assertEquals(['#ffffff', '#ffffff'], Utils::hexToForegroundAndBorder("#0123"));
370+
}
371+
359372
/**
360373
* Test function that converts colour hex notation to (nearest) name.
361374
* If value is not hexadecimal, return it unchanged.

0 commit comments

Comments
 (0)