File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -356,6 +356,19 @@ public function testConvertToHexUnknown(): void
356
356
self ::assertNull (Utils::convertToHex ('#12346h ' ));
357
357
}
358
358
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
+
359
372
/**
360
373
* Test function that converts colour hex notation to (nearest) name.
361
374
* If value is not hexadecimal, return it unchanged.
You can’t perform that action at this time.
0 commit comments