Ejemplo n.º 1
0
 /**
  * {@inheritDoc}
  */
 public function remove($optionNames)
 {
     parent::remove($optionNames);
     /* This must be done after the parent to ensure that the parent's locked state is enforced. */
     foreach ((array) $optionNames as $option) {
         unset($this->casts[$option]);
     }
     return $this;
 }
Ejemplo n.º 2
0
 public function testRemoveOptionAndNormalizer()
 {
     $this->options->set('foo1', 'bar');
     $this->options->setNormalizer('foo1', function (Options $options) {
         return '';
     });
     $this->options->set('foo2', 'bar');
     $this->options->setNormalizer('foo2', function (Options $options) {
         return '';
     });
     $this->options->remove('foo2');
     $this->assertEquals(array('foo1' => ''), $this->options->resolve());
 }
 public function testRemoveUnknownOptionIgnored()
 {
     $this->assertNotNull($this->resolver->remove('foo'));
 }