Skip to content

Commit

Permalink
Compatible with previous usage methods
Browse files Browse the repository at this point in the history
  • Loading branch information
wujunze committed Jul 18, 2018
1 parent 14f8f89 commit e4bc6bf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Colors.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public function __construct()
}

// Returns colored string
public function getColoredString($string, $foreground_color = null, $background_color = null, $new_line = true)
public function getColoredString($string, $foreground_color = null, $background_color = null, $new_line = false)
{
$colored_string = "";

Expand Down
3 changes: 2 additions & 1 deletion tests/ColorTest/CliColorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ public function testColoredString()
$color = $this->createServer();
$res = $color->getColoredString("Testing Colors class, this is purple string on yellow background.",
"purple",
"yellow");
"yellow",
true);
$this->assertEquals('Testing Colors class, this is purple string on yellow background.' . PHP_EOL, $res);
}

Expand Down

0 comments on commit e4bc6bf

Please sign in to comment.