function it_convert_color_tag_with_array_convert() { $message = "%black[data]% Alfred Dupond a modifié(e) le %whitetitre%"; $colors = ["black" => "#000000", "white" => "#ffffff"]; foreach (Convert::convertToObjects($colors) as $colorObject) { $this->addColor($colorObject); } $this->colour($message)->shouldReturn('<span style="color:#000000">[data]</span> Alfred Dupond a modifié(e) le <span style="color:#ffffff">titre</span>'); }
public function __construct() { $this->colors = Convert::convertToObjects(["black" => "[0;30m", "red" => "[0;31m", "green" => "[0;32m", "yellow" => "[0;33m", "blue" => "[0;34m", "purple" => "[0;35m", "cyan" => "[0;36m", "white" => "[0;37m"]); }
public function __construct() { $this->colors = Convert::convertToObjects(["ghostWhite" => "#F8F8F0", "lightGhostWhite" => "#F8F8F2", "lightGray" => "#CCC", "gray" => "#888", "brownGray" => "#49483E", "darkGray" => "#282828", "yellow" => "#E6DB74", "blue" => "#66D9EF", "pink" => "#F92672", "purple" => "#AE81FF", "brown" => "#75715E", "orange" => "#FD971F", "lightOrange" => "#FFD569", "green" => "#A6E22E", "seaGreen" => "#529B2F"]); }