public function testCanTestForColorSupport()
 {
     // setup the test
     $outputEngine = new StringOutput();
     // perform the test
     $allowColors = $outputEngine->supportsColors();
     // check the results
     $this->assertTrue(is_bool($allowColors));
 }
Пример #2
0
 /**
  * Returns the output as a string
  *
  * @param  var $value
  * @param  text.json.Format $format
  * @return string
  */
 public static function of($value, Format $format = null)
 {
     $output = new StringOutput($format ?: Format::$DEFAULT);
     $output->write($value);
     return $output->bytes();
 }