Skip to content

Commit 6418df1

Browse files
committed
add test
1 parent 0f6b660 commit 6418df1

File tree

1 file changed

+23
-2
lines changed

1 file changed

+23
-2
lines changed

tests/ColorTest/CliColorTest.php

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,31 @@ public function testGetForegroundColors(){
3737
public function testInitColoredString()
3838
{
3939
$color = $this->createServer();
40-
$string =$color::initColoredString('hello php');
41-
$this->assertEquals('hello php[0m', $string);
40+
$string =$color::initColoredString('hello php', 'yellow', 'black');
41+
$this->assertNotNull($string);
4242
}
4343

44+
public function testWarn(){
45+
$color = $this->createServer();
46+
$string = $color::warn('this the warn string');
47+
$this->assertNull($string);
48+
}
4449

50+
public function testError(){
51+
$color = $this->createServer();
52+
$string = $color::error('this the warn string');
53+
$this->assertNull($string);
54+
}
4555

56+
public function testSuccess(){
57+
$color = $this->createServer();
58+
$string = $color::success('this the warn string');
59+
$this->assertNull($string);
60+
}
61+
62+
public function testNotice(){
63+
$color = $this->createServer();
64+
$string = $color::notice('this the warn string');
65+
$this->assertNull($string);
66+
}
4667
}

0 commit comments

Comments
 (0)