Пример #1
0
 public function testSetOutputter()
 {
     // This test assumes that the format defaults to JSON.
     $formatter = $this->runner->getOutputter()->getFormatter();
     $this->assertTrue(strpos(get_class($formatter), 'Pretty') !== false);
     // This test assumes that the format defaults to Bash.
     $this->runner->setOutputter('bash', 'php://stdout');
     $formatter = $this->runner->getOutputter()->getFormatter();
     $this->assertTrue(strpos(get_class($formatter), 'Bash') !== false);
     $this->runner->setOutputter('json', 'php://stdout');
     $formatter = $this->runner->getOutputter()->getFormatter();
     $this->assertTrue(strpos(get_class($formatter), 'JSON') !== false);
 }
Пример #2
0
/**
 * Sets the Terminus outputter to a specific format and destination
 *
 * @param string $format      Type of formatter to set on outputter
 * @param string $destination Where output will be written to
 * @return void
 */
function setTerminusOutputter($destination = 'php://stdout', $format = null)
{
    Runner::setOutputter($format, $destination);
}