public function testCanTestForColorSupport() { // setup the test $outputEngine = new StringOutput(); // perform the test $allowColors = $outputEngine->supportsColors(); // check the results $this->assertTrue(is_bool($allowColors)); }
/** * 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(); }