示例#1
0
 public function testGetColorsIs1ForUnknownTerminal()
 {
     $term = getenv('TERM');
     putenv('TERM=');
     $terminal = new Terminal();
     $this->assert($terminal->getColors())->equals(1);
     putenv("TERM={$term}");
 }
示例#2
0
 public function getResultPrinter()
 {
     $terminal = new Terminal();
     if ($this->ci || $terminal->getColors() < 2) {
         return new CIResultPrinter();
     }
     return new DefaultResultPrinter();
 }