/**
  * {@inheritdoc}
  */
 public function accept()
 {
     $local = $this->key();
     if (null !== $this->base) {
         $local = preg_replace($this->base, '', $local);
     }
     return $this->subscriber->isAllowed($this->builder, $this->key(), $local);
 }
 /**
  * Verifies that iterator is wrapped with another iterator.
  */
 public function testOnBuildFromIterator()
 {
     $event = new PreBuildFromIteratorEvent($this->builder, new ArrayIterator(array()));
     $this->subscriber->onBuildFromIterator($event);
     self::assertInstanceOf('Box\\Component\\Builder\\Iterator\\DeltaUpdateIterator', $event->getIterator());
 }