/**
  * @param \ReflectionClass $theClass
  * @param \Stagehand\TestRunner\Util\PHPUnitXMLConfiguration $phpunitXMLConfiguration
  */
 public function __construct(\ReflectionClass $theClass, PHPUnitXMLConfiguration $phpunitXMLConfiguration = null)
 {
     $this->phpunitXMLConfiguration = $phpunitXMLConfiguration;
     parent::__construct($theClass);
     if ($this->phpunitXMLConfiguration->isEnabled()) {
         $this->filterGroup();
     }
 }
 /**
  * @return array
  */
 protected function doBuildRunnerOptions()
 {
     $options = array();
     if ($this->phpunitXMLConfiguration->isEnabled()) {
         $options[] = '--phpunit-config=' . escapeshellarg($this->phpunitXMLConfiguration->getFileName());
     }
     return $options;
 }
 /**
  * @param \Stagehand\TestRunner\Runner\PHPUnitRunner\Printer\ResultPrinter $printer
  * @param \PHPUnit_Framework_TestResult $testResult
  * @return array
  * @since Method available since Release 3.3.0
  */
 protected function createArguments(ResultPrinter $printer, \PHPUnit_Framework_TestResult $testResult)
 {
     $arguments = array();
     $arguments['printer'] = $printer;
     Stream::register();
     $arguments['listeners'] = array(new TestDoxPrinter(fopen('testdox://' . spl_object_hash($testResult), 'w'), $this->terminal, $this->prettifier()));
     if ($this->hasJUnitXMLFile()) {
         $arguments['listeners'][] = new JUnitXMLPrinter(null, $this->createJUnitXMLWriter(), $this->testTargetRepository);
     }
     if ($this->shouldStopOnFailure()) {
         $arguments['stopOnFailure'] = true;
         $arguments['stopOnError'] = true;
     }
     if ($this->phpunitXMLConfiguration->isEnabled()) {
         $arguments['configuration'] = $this->phpunitXMLConfiguration->getFileName();
     }
     return $arguments;
 }
 public function prepare()
 {
     if ($this->phpunitXMLConfiguration->isEnabled()) {
         $this->earlyConfigure();
     }
 }