예제 #1
0
파일: Tools.php 프로젝트: matks/vivian
 public function testColors()
 {
     $testString = 'hello';
     $this->string(Vivian\Tools::green($testString))->isEqualTo("hello");
     $testString2 = 'this is [a test]';
     $this->string(Vivian\Tools::blue($testString2))->isEqualTo("this is [a test]");
 }
예제 #2
0
파일: test-color.php 프로젝트: matks/vivian
#!/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;
예제 #3
0
파일: test-mixed.php 프로젝트: matks/vivian
#!/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);