public function testColors() { $testString = 'hello'; $this->string(Vivian\Tools::green($testString))->isEqualTo("[32mhello[0m"); $testString2 = 'this is [a test]'; $this->string(Vivian\Tools::blue($testString2))->isEqualTo("[34mthis is [a test][0m"); }
#!/usr/bin/env php <?php $autoloadFile = __DIR__ . '/../../vendor/autoload.php'; require $autoloadFile; use Matks\Vivian\Tools; echo 'Look how pretty this is:' . PHP_EOL; echo Tools::red('W'); echo Tools::green('o'); echo Tools::yellow('n'); echo Tools::blue('d'); echo Tools::black('e'); echo Tools::purple('r'); echo Tools::cyan('f'); echo Tools::white('u'); echo 'l !!!' . PHP_EOL;
#!/usr/bin/env php <?php $autoloadFile = __DIR__ . '/../../vendor/autoload.php'; require $autoloadFile; use Matks\Vivian\Tools; $array = array('Foo' => 'aaaaaaa', Tools::blink('Blinker') => Tools::underline('Underlined'), Tools::blue('Blue') => $styled); echo Tools::s_phpArray($array);