Skip to content

Commit b7703dc

Browse files
committed
add cli test
1 parent 9fc7f88 commit b7703dc

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

example/test.php

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<?php
2+
/**
3+
* Created by PhpStorm.
4+
* User: wujunze
5+
* Date: 2017/3/17
6+
* Time: 下午2:15
7+
*/
8+
require_once __DIR__ . './../vendor/autoload.php';
9+
10+
$colors = new Wujunze\Colors();
11+
// Test some basic printing with Colors class
12+
echo $colors->getColoredString("Testing Colors class, this is purple string on yellow background.", "purple", "yellow") . PHP_EOL;
13+
echo $colors->getColoredString("Testing Colors class, this is blue string on light gray background.", "blue", "light_gray") . PHP_EOL;
14+
echo $colors->getColoredString("Testing Colors class, this is red string on black background.", "red", "black") . PHP_EOL;
15+
echo $colors->getColoredString("Testing Colors class, this is cyan string on green background.", "cyan", "green") . PHP_EOL;
16+
echo $colors->getColoredString("Testing Colors class, this is cyan string on default background.", "cyan") . PHP_EOL;
17+
echo $colors->getColoredString("Testing Colors class, this is default string on cyan background.", null, "cyan") . PHP_EOL;

0 commit comments

Comments
 (0)