/** * Tests to make sure string is not automatically rendered in non-interactive mode * * @return void **/ public function testOutputNonInteractiveDoesNotAutmaticallyRender() { $output = new Output(); $output->makeNonInteractive(); $string = $this->getBuffered(function () use($output) { $output->addLine('Hello, friend'); }); $this->assertEquals('', $string, 'Output did not have the expected empty string'); }
/** * Show current output format * * @param \Hubzero\Console\Output $output The output object * @return void **/ public static function format($output) { $output->addString('The profile log has the following format ('); $output->addString('* indicates visible field', array('color' => 'blue')); $output->addLine('):'); $i = 0; foreach (static::$fields as $field => $status) { if ($i != 0) { $output->addString(' '); } $output->addString('<'); if ($i < 10) { $output->addString($i . ':'); } if ($status) { $output->addString('*' . $field, array('color' => 'blue')); } else { $output->addString($field); } $output->addString('>'); $i++; } $output->addSpacer()->addSpacer(); }