Esempio n. 1
0
 public function testNotRequiredIfRequiredAndDefaultValue()
 {
     $this->assertFalse($this->resolver->isRequired('foo'));
     $this->resolver->setRequired(array('foo'));
     $this->resolver->setDefaults(array('foo' => 'bar'));
     $this->assertFalse($this->resolver->isRequired('foo'));
 }
 public function testRequiredIfRequired()
 {
     $this->assertFalse($this->resolver->isRequired('foo'));
     $this->resolver->setRequired(array('foo'));
     $this->assertTrue($this->resolver->isRequired('foo'));
 }
Esempio n. 3
0
 /**
  * @param OptionsResolver $resolver
  * @param Event           $event
  */
 protected static function configureOptions(OptionsResolver $resolver, Event $event)
 {
     $resolver->setDefaults(array('gulp-bin' => './node_modules/.bin/gulp', 'gulp-log-prepend' => '', 'gulp-tasks' => []));
     $resolver->isRequired('gulp-bin');
 }
 public function testIsNotMissingAfterClear()
 {
     $this->resolver->setRequired('foo');
     $this->resolver->clear();
     $this->assertFalse($this->resolver->isRequired('foo'));
 }
Esempio n. 5
0
 /**
  * @param OptionsResolver $resolver
  * @param Event           $event
  */
 protected static function configureOptions(OptionsResolver $resolver, Event $event)
 {
     $binDir = $event->getComposer()->getConfig()->get('bin-dir');
     $resolver->setDefaults(array('phpcs-bin' => $binDir . '/phpcs', 'phpcs-include' => array('.'), 'phpcs-exclude' => array('vendor'), 'phpcs-report' => 'checkstyle', 'phpcs-xml-report-file' => 'php-checkstyle.xml', 'phpcs-standard' => 'psr2', 'phpcs-fail-on-error' => false, 'phpcs-log-prepend' => ''));
     $resolver->isRequired('phpcs-bin');
 }