SimpleCommandLineParser::isJUnit PHP Method

isJUnit() public method

Output should be JUnit or not.
public isJUnit ( ) : boolean
return boolean True if JUnit desired.
    public function isJUnit()
    {
        return $this->junit;
    }

Usage Example

 /**
  * Assembles the appropriate reporter for the environment.
  */
 public function __construct()
 {
     if (SimpleReporter::inCli()) {
         $parser = new SimpleCommandLineParser($_SERVER['argv']);
         $this->doCodeCoverage = $parser->doCodeCoverage();
         $this->excludes = $parser->getExcludes();
         if ($parser->isXml()) {
             $interfaces = array('XmlReporter');
         } else {
             if ($parser->isJUnit()) {
                 $interfaces = array('JUnitXmlReporter');
             } else {
                 $interfaces = array('TextReporter');
             }
         }
         if ($parser->help()) {
             echo $parser->getHelpText();
             exit(1);
         }
         $reporter = new SelectiveReporter(SimpleTest::preferred($interfaces), $parser->getTestCase(), $parser->getTest());
         if ($parser->noSkips()) {
             $reporter = new NoSkipsReporter($reporter);
         }
     } else {
         $reporter = new SelectiveReporter(SimpleTest::preferred('HtmlReporter'), @$_GET['c'], @$_GET['t']);
         if (@$_GET['skips'] === 'no' || @$_GET['show-skips'] === 'no') {
             $reporter = new NoSkipsReporter($reporter);
         }
     }
     parent::__construct($reporter);
 }