Example #1
0
 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>');
 }
Example #2
0
 public function __construct()
 {
     $this->colors = Convert::convertToObjects(["black" => "", "red" => "", "green" => "", "yellow" => "", "blue" => "", "purple" => "", "cyan" => "", "white" => ""]);
 }
Example #3
0
 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"]);
 }