public function testBuildOverridingDefaultPhingOtions()
 {
     $serviceOptions = new ServiceOptions();
     $phingOptions = new PhingOptions();
     $phingOptions->isVerbose(true);
     $service = new PhingService($serviceOptions, $phingOptions);
     $result = $service->build('show-defaults dist', array('build_file' => './test/PhingServiceTest/_assets/build-example.xml', 'verbose' => false));
     $this->assertNotContains('-verbose', $result->getCommandLine());
 }
 /**
  * Constructs a configured Process instance
  *
  * @param string       $targets space separated list of targets
  * @param PhingOptions $options
  *
  * @return Process
  */
 private function createProcessInstance($targets, PhingOptions $options)
 {
     $builder = new ProcessBuilder();
     $builder->setPrefix($this->options->getPhingBin());
     $builder->setArguments($options->toArgumentsArray());
     foreach (explode(' ', $targets) as $target) {
         if (strlen(trim($target))) {
             $builder->add(trim($target));
         }
     }
     return $builder->getProcess();
 }
 public function testArgumentsArrayBooleans()
 {
     $options = new PhingOptions();
     $options->setDebug(true);
     $options->setList(true);
     $options->setLongTargets(true);
     $options->setQuiet(true);
     $options->setVerbose(true);
     $this->assertContains('-debug', $options->toArgumentsArray());
     $this->assertContains('-list', $options->toArgumentsArray());
     $this->assertContains('-longtargets', $options->toArgumentsArray());
     $this->assertContains('-quiet', $options->toArgumentsArray());
     $this->assertContains('-verbose', $options->toArgumentsArray());
 }