/** * Writes a terminal escape code * * @param string $code_template String template in <b>sprintf</b> format * @param array $replacements Arguments for <b>sprintf</b> */ public function writeCode($code_template, $replacements = []) { $this->write(Console\Code::make($code_template, $replacements)); }
public function testMakeBgColor() { $this->assertEquals("[40m", Code::bgColor(Code::COLOR_BLACK)); }